Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursor to XML not picking up lines
Message
 
To
12/06/2017 05:44:10
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008 R2
Network:
Windows Server 2008 R2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01650938
Message ID:
01651923
Views:
65
>>>
>>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
Go raibh maith agat

~M
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform