In xml use the entity reference for the apostrophe when the xml is created. Keep in mind the 5 predefined entity references. I have a utility for this from the generosity of other UTers:
LOCAL lcReturn
lcReturn = TRAN(teExpression)
IF VARTYPE(teExpression) = 'C'
lcReturn = ALLTRIM(lcReturn)
lcReturn = STRTRAN(lcReturn, '&', '&')
lcReturn = STRTRAN(lcReturn, '<', '<')
lcReturn = STRTRAN(lcReturn, '>', '>')
lcReturn = STRTRAN(lcReturn, '"', '"')
lcReturn = STRTRAN(lcReturn, "'", ''')
ENDIF
FUNCTION XMLDeCode
LPARAMETERS cTXT
LOCAL i,ch
FOR i=1 TO 255
ch=ALLTRIM(STR(i))
cTXT=STRTRAN(cTXT,"&#"+ch+";",CHR(i))
ENDFOR
RETURN cTXT
>Hi All,
>
>I have a string of XML that I'd like to load into an XMLAdapter. I can do this most of the time by calling the latter's LoadXML() method and passing in the XML string. Occasionally, the method causes an error because the XML string contains single quote delimited values that can contain an apostrophe. This throws off the balance of quotes. Here's an example snippet:
>
>
><rs:data>
><z:row LandStreetNum='1000' LandStreetName='Richard's St'... />
></rs:data>
>
>
>Note how Richard's St messes up the quotes.
>
>Is there any way to tell the XMLAdapter to substitute double quote "delimiters" for single quotes when it tries to LoadXML()? Of course it has to ignore the apostrophe too :)
>
>TIA
>
>Mike
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"