Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validating XML file
Message
Information générale
Forum:
ASP.NET
Catégorie:
XML
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01439626
Message ID:
01439638
Vues:
42
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform