Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor to XML not picking up lines
Message
De
12/06/2017 09:56:39
 
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008 R2
Network:
Windows Server 2008 R2
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01650938
Message ID:
01651925
Vues:
73
>>>>
>>>I've attached the xml file. I use FileToStr() with the xml file to convert into a string and then use the string in the load() command. I've also tried it with a strconv( , 11) with no joy.
>>>~M
>>
>>Your file has a UNICODE BOM at the beginning. It must be stripped off before passing it, as a string, to the XML parser. So you simply and preferably Load it, instead of LoadXML it, or SUBSTR(..., 3) before Load.
>Thanks, reckon I'm on the right track now but still stuck. I have the code read into a variable and I have the following so that it removes the first x characters.
>
lcContent = SUBSTR(lcContent,AT("<",lcContent,1), LEN(lcContent) - (AT("<",lcContent,1) - 1))
>I show this to screen and it looks okay. But if I try to use it I get the adapter.tables.Count = 0. If I StrToFile and then read it back in I get the same Unicode BOM error.
>~M

The document encoding is different from the one that is declared (UTF-16) and the parser is complaining at thar. If no one else steps in, I'll come back to you later, unless you find a solution for yourself (I'll have to go offline for a few hours).
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform