Home > Net > A great god, please help take a look at the following c # code into QT language, the key grammar to
A great god, please help take a look at the following c # code into QT language, the key grammar to
Time:09-23
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); }