>I'm using an XMLADAPTER to create some XML of nested tables. Things are working fine except when the data contains those "special" characters - & in particular.
>
>In one of the fields that stores a name, the ampersand character is used and that causes the XML to be truncated when received at a web service. If I manually edit the XML to substitute "&" with "and" things are fine. I know that I need to encode & with '%26' or '&' (or simply change it to "and"). Is there any property/method of the XMLADAPTER to automatically do this?
>
>TIA
>Mike
Hi Mike,
Could you provide a simple example with code?
The following code works without any problems:
clear
set memowidth to 120
create CURSOR test(f1 c(10))
insert into test values (REPLICATE("&",5))
local oXA as XMLAdapter
oXA=CREATEOBJECT("XMLAdapter")
oXA.XMLSchemaLocation=""
oXA.AddTableSchema("test")
oXA.ToXML("cXML")
?cXML
oXA.LoadXML(cXML)
oXA.Tables(1).ToCursor(.F.,"test2")
select test2
?ALIAS()
list
Thanks,
Aleksey.