The red font is, if you don't understand, please contact me QQ: 20028205
Using system; using system.x; using system.xml.xpath; using system.web; using system.collections;
Namespace gst.common.xml {///
///
XMLNode node = doc.selectsinglenode ("/ aspxfiles / file [text () = /" " files " / "]");
IF (Node! = null) {node.attributes [0] .INNNERTEXT = DESC;
Doc.save (httpcontext.current.server.mappath (filesrc));
} ///
Foreach (Object Obj IN Al) {xmlnode node = doc.selectsinglenode ("/ aspxfiles / file [text () = /" " Obj.toString () " / "]"); if (node == null) { XmlElement ElementChild = doc.CreateElement ( "File"); ElementChild.InnerText = obj.ToString (); XmlCDataSection cdata = doc.CreateCDataSection (obj.ToString ()); XmlAttribute attribute = doc.CreateAttribute ( "Desc"); attribute. Value = cdata.Value; ElementChild.Attributes.Append (attribute); Element.AppendChild (ElementChild); Update = true;}} if (Update) doc.Save (HttpContext.Current.Server.MapPath (fileSrc));
} ///
String filename = path.GetFileName (Innerfile); al.add (filename);}} getallaspxfile (aspfile, ref allow);}
} Else {
String [] FILES = Directory.getFiles (WebPath); FOREACH (String Aspfile IN Files) {IF (path.getextension (aspfile) .tolower () == "ASPX") {
String filename = path.GetFileName (aspfile); al.add (filename);}}}}
}