DayLaborer
Programmer
Is there a way to more easily validate a string containing XML other than this:
...and see if it throws an exception. The thing is, I don't need an XMLDocument object, I just need a String containing valid XML.
What I'd love to do is this:
...but unfortunately such a static method does not exist.
Suggestions?
Thanks,
Eliezer
Code:
XmlDocument doc = new XmlDocument();
doc.LoadXml(myStringContainingXML);
What I'd love to do is this:
Code:
bool isAllCool = XmlDocument.Validate(myStringContainingXML);
Suggestions?
Thanks,
Eliezer