I also just started XML, but I also want to share my own things to share a university. Please support it.
This is 001.xml file XML Version = "1.0" encoding = "UTF-8"?>
INT FLAG = 0;
XmlTextReader objtxtrd = new xmlTextReader (StrfilePath);
While (Objtxtrd.Read ())
{
IF (objtxtrd.nodetype = xmlnodetype.eray)
{
IF (objtxtrd.hasettributes)
{
Objtxtrd.movetoAttribute ("NUM");
IF (Objtxtrd.Value == TextBox1.text)
{Flag = 1; MessageBox.show ("Find success"; Break;}
}
}
}
IF (Flag == 0) {MessageBox.show ("Without this person, please sure to enter.");
If you have Chinese characters in your document, please remember to pay attention to the form of UTF-8 when you will save, otherwise I will not want me.