Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error In XmlToCursor()... Invalid Character Found.
Message
From
05/05/2006 09:27:21
 
 
To
04/05/2006 13:58:29
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows Server 2003
Miscellaneous
Thread ID:
01119249
Message ID:
01119569
Views:
18
> > "wrap memo data in CDATA sections"
> What is the advantage of that flag?

Hi

This flag wraps memo fields so they are interprested by the XML parser as text and not as markup (XML). This saves having to encode characters like & and < and >.

However, if you have a rogue character - e.g. chr(5) - in the memo, then XML to cursor will error regardless of CDATA, and you will have to pre-parse these characters out before calling XMLToCursor


clear
create cursor foo (bar m)
insert into foo values (chr(5))

? "Without CDATA"
? "-----------------------"

cursortoxml(alias(), "cXML", 1)
? cXML

? "With CDATA"
? "-----------------------"
cursortoxml(alias(), "cXML", 1, 8)
? cXML

* Errors whichever way
xmltocursor(cXML)

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform