error on reading from xml file

  • Thread starter Thread starter jez
  • Start date Start date
J

jez

I've been importing many xml files so far.. without problems. I now ran
through an error, most probably due to some weird symbol in the xml file
which has hex value 0x15 (looks like a square).

In the xml file that I am importing I am not specifying any specific
encoding. Should I maybe specify some kind of encoding to make sure this
kind of problem does not occur ?

The beginning of my xml file looks like this :
<customersDS>
<customersTable>
....
</customersTable>
</customersDS>

Thanks

jez
 
Jez,

Yes. Try using the encoding like Windows-1252. You can do this by putting
suitable XML header like

<?xml version="1.0" encoding = "Windows-1252"?>

at the top.

Best Regards,
Y. Sivaram
 
Hi,

Well, in ASCII the 0x15 mean "Negative Ack" it's a control char meaning
it's not printable, maybe the XML file had errors.


Cheers,
 
Basically the problem was solved by removing that character (  ) from the
xml file. What I was wondering though is whether there is any way to show
this character in my .Net CF app so that I don't get this error ?

The data comes from Navision Attain so from now on there's going to be an
extra check to see if that symbol is exported or not.
 
Hi,

IIRC an square box is how a non-printable chars is represented on the
screen, I use the char 20 decimal as a field separator and if I open the
file in notepad that's what I get.

As the processing of the XML file is done by the framework you cannot
control what to do with it, it's a no valid char therefore the parser will
give you error.

I dont think there is a solution for this.

Cheers,
 
Back
Top