EDN Admin
Well-known member
hi,
I need validation function for XML.
Can be multiple parent element tag but not schema i.e., not XSD file.
I have done this function see code below
XmlTextReader txtreader= null; <br/>
try<br/>
{<br/>
txtreader = new XmlTextReader(new StringReader(CustomerXML));
<br/>
while (txtreader.Read()) { }<br/>
}<br/>
catch (XmlException XmlExc)<br/>
{<br/>
MessageBox.Show(string.Format("Incomplete XML error on line number <{0}>", XmlExc.LineNumber))
<br/>
return false;<br/>
}
<br/>
finally<br/>
{<br/>
txtreader.Close();<br/>
}
It showing validation but multiple parent tag is showing error.
My question, should allow multiple tag with out showing error.
Thanks in advance.
- Suman G
View the full article
I need validation function for XML.
Can be multiple parent element tag but not schema i.e., not XSD file.
I have done this function see code below
XmlTextReader txtreader= null; <br/>
try<br/>
{<br/>
txtreader = new XmlTextReader(new StringReader(CustomerXML));
<br/>
while (txtreader.Read()) { }<br/>
}<br/>
catch (XmlException XmlExc)<br/>
{<br/>
MessageBox.Show(string.Format("Incomplete XML error on line number <{0}>", XmlExc.LineNumber))
<br/>
return false;<br/>
}
<br/>
finally<br/>
{<br/>
txtreader.Close();<br/>
}
It showing validation but multiple parent tag is showing error.
My question, should allow multiple tag with out showing error.
Thanks in advance.
- Suman G
View the full article