Options

XMLPort problem with Cornous database

navnoobnavnoob Member Posts: 26
Hi, I am playing with the XML port and trying to export the Cornous's Customer table to my hard drive as an xml file. The export is fine, but when I want to open the xml file either in a web browser, datagrid from .NET, it keep telling me

Exception System.Xml.XmlException was thrown in debuggee:
'.', hexadecimal value 0x00, is an invalid character.

from the C# compiler

and

XML Parsing Error: not well-formed
Location: file:///C:/test.xml

from web browser.

However, If i open the exported XML file from notepad, and resave it, I can see the XML file through my browser and datagrid.

So what is causing that problem? And is there a way to be able to export the table without having 0x00 character or something in it? Beecause I want to retrieve an xml from the messaging queue and display to a datagrid, but each time i do a dataset.readXml(msg.BodySteam); It'll keep crashing due to weird character somehow from the XML file that is export through xmlport..

Any help is appreciated.

Thanks.

Comments

  • kinekine Member Posts: 12,562
    Try to open the XML in some editor allowing to view it in Hexadecimal. Search for the 00 character. Can you post the example, where the character is placed in the file?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.