![]() If you know the encoding then you can read it in with a TextReader and add the XML declaration or change the encoding when saving back. And the first thing you need to know to fix the document is the encoding of the document so ask the producer of the document how it is encoded. If you want to fix the document at your end then you can't use any XML APIs to do that as the document is not well-formed. You need to fix that at the source so that whoever generates the XML makes sure it is properly encoded and declares the encoding if needed (i.e. That particular document where you get the error is not well-formed, probably because it is not properly encoded. When you load an XML document in a browser like IE then the browser uses its XML parser (in case of IE that parser is MSXML) to check the XML for well-formedness. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |