Hia I need your help
I have never done anything with XML before.
I retrieve from an external source a memo field containing XML data with utf-8 encoding, to convert this into a cursor I do some checks to replace & symbols to say & and replace control characters CHR(1) to CHR(31) with '' just incase.
I then do the two lines below
STRTOFILE(xmltext, "names.xml")
XMLTOCURSOR("names.xml", "XMLNames", 512)
this all works fine until a memo field the 9th one to be looped through gets the following error:
XML Parse Error: An Invalid character was found in text content.
Line 148, Position21. <fieldname>No.12 Bra
That actual line should read
<fieldname>No.12 Bradwells field</fieldname>
when you look at the source data through access it appears OK but when you look at the memo field in foxpro there is a square symbol between the a and the d.
I tried to do an MLINE and step through the ascii codes to find out what this illusive character is but all it picks up on the MLINE is <fieldname>.
Is there a way of removing all invalid xml utf-8 characters. Ore finding what this invalid character is?
Thanks
R
I have never done anything with XML before.
I retrieve from an external source a memo field containing XML data with utf-8 encoding, to convert this into a cursor I do some checks to replace & symbols to say & and replace control characters CHR(1) to CHR(31) with '' just incase.
I then do the two lines below
STRTOFILE(xmltext, "names.xml")
XMLTOCURSOR("names.xml", "XMLNames", 512)
this all works fine until a memo field the 9th one to be looped through gets the following error:
XML Parse Error: An Invalid character was found in text content.
Line 148, Position21. <fieldname>No.12 Bra
That actual line should read
<fieldname>No.12 Bradwells field</fieldname>
when you look at the source data through access it appears OK but when you look at the memo field in foxpro there is a square symbol between the a and the d.
I tried to do an MLINE and step through the ascii codes to find out what this illusive character is but all it picks up on the MLINE is <fieldname>.
Is there a way of removing all invalid xml utf-8 characters. Ore finding what this invalid character is?
Thanks
R