Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validating XML file
Message
General information
Forum:
ASP.NET
Category:
XML
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01439626
Message ID:
01439638
Views:
43
>Hi,
>
>I need to create an XML file by typing the content from a book that I follow. The XML is somewhat involved. I am using a Notepad to type in the content (if you have better suggestions that don't involve learning complicated tools, please let me know). But I also want to be sure that once I am done entering the content I didn't make a typo somewhere. How can I validate this XML file?
>
>TIA.

Writing a code snippet that will validate the XML file should be pretty easy.

I think this code would throw an exception if the XML was not valid.
XmlTextReader reader = new XmlTextReader ("myxmlfile.xml");
http://support.microsoft.com/kb/307548

Also XML editors have built in validation tools along with highlighting and intellisense.

Einar
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform