62,046
社区成员
发帖
与我相关
我的任务
分享
<photos>
<config auto_play="true" auto_play_duration="2.4" grid_row="4" grid_column="6" tween_duration="0.7" tween_delay="0.02" stylesheet="flashmo_224_style.css" bar_status="1" />
<photo>
<filename>photos/flashmo_940x400_01.jpg</filename>
<description><p class="subtitle">Photo title one goes here</p><p><a href="http://www.flashline.cn" target="_parent">Lorem ipsum dolor sit amet</a>, consectetur adipiscing elit. <span class="highlight">Quisque at ante sit amet</span> erat laoreet <u>fermentum</u>. Quisque nec nisl. Nam scelerisque cursus dolor. Donec in. <span class="note">This text is dynamically loaded from the external XML file. This textfield supports HTML and CSS.</span></p></description>
</photo>
<photo>
<filename>photos/flashmo_940x400_02.jpg</filename>
<description><p class="subtitle">Photo title two goes here</p><p>Fusce quis diam sit amet tortor luctus pellentesque. <a href="http://www.flashline.cn/donate" target="_blank">Donec accumsan urna</a> non elit tristique mattis. <b>Vivamus fermentum</b> orci viverra nisl. Donec euismod enim et risus. <span class="note">Integer vestibulum luctus leo at iaculis. Nulla scelerisque sodales arcu elementum imperdiet.</span></p></description>
</photo>
<photo>
<filename>photos/flashmo_940x400_03.jpg</filename>
<description><p class="subtitle">Photo title three goes here</p><p>In velit urna, <u>convallis id</u>, pharetra in, iaculis sit amet, mi. Praesent consectetur imperdiet mauris. Suspendisse at pede vel lorem pulvinar laoreet. Etiam et neque. <span class="note">This text is dynamically loaded from the external XML file. This textfield supports HTML and CSS.</span></p></description>
</photo>
</photos>
foreach (XmlElement photos in dom.DocumentElement.ChildNodes)
{
if (i==0)
{
i = 1;
continue;
}
XmlNode xn = dom.CreateNode(XmlNodeType.Element, "transition", "");
XmlElement el = dom.CreateElement("transition"); //添加person节点
el.SetAttribute("flow", "out"); //添加person节点的属性"name"
el.SetAttribute("direction", "left"); //添加person节点的属性"name"
string descriptionstr = photos.SelectSingleNode("description").InnerText;
photos.InsertAfter(xn,photos.LastChild);
}
dom.Save(Server.MapPath(@"../flash/" + name));
XmlDocument dom = new XmlDocument();
dom.Load("aaa.xml");//装载XML文档
int num = 0;
foreach(XmlElement photos in dom.DocumentElement.ChildNodes)
{
string descriptionstr = photos.SelectSingleNode("description").InnerText;
photos.SelectSingleNode("description").InnerText=descriptionstr+"<transition flow="out" direction="left"></transition>";
}
dom.Save();