I am trying to read in XML files character by character, I have this part working but for some reason whenever there is a "&" in the value for a node the return has "amp;" after it. I have no idea why this happening and the method that I am using to read the value in is:
not easy to say, because you don't tell us if the file is in ASCII, UTF8 or UNICODE.
A xml file cold be written in UTF8. So check the coding of that file.
But why you read it byte wise? This is slow and normally not needed.
And when byte by byte, why not ReadCharacter() ? This saves the conversion.
I would read the file completely in a buffer and use CatchXML().
Also I don't understand 100% what you mean: a & is & escaped
Bernd
Last edited by infratec on Wed Mar 29, 2017 8:29 pm, edited 1 time in total.
As to why I am doing this character by character, I am taking this over from someone else and we have to use the standard PureBasic with none of the extension libraries.
The file is a UTF-8 file and I have tried to use ReadString(),ReadCharacter() and ReadByte() all of them have returned the same way.