Home > Mobile > Please god to give directions, read the following c # code to modify the XML file into QT language,
Please god to give directions, read the following c # code to modify the XML file into QT language,
Time:09-24
Here is my written in C # read XML format file, need to replace C with node, all the oldname string with newname, then oldname in the name of the file also with newname, also ask god to help
XmlDocument doc=new XmlDocument (); XmlReaderSettings Settings=new XmlReaderSettings (); Settings. IgnoreComments=false; String oldname; String newname. XmlWriterSettings set=new XmlWriterSettings (); Set the Indent=true; ? XmlReader reader1=XmlReader. Create (" settlement "+ oldname +". The XML ", Settings).
Doc. The Load (reader1); XmlNodeList nodeList=doc. SelectNodes ("////a/b/c "); for (int i=0; IReader1. Close (); Using (XmlWriter stw1=XmlWriter. Create (" settlement "+ newname +". The XML ", set ") { Doc. Save (stw1); }