Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XML Parse Error: Invalid Character
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00881046
Message ID:
00881164
Views:
25
This message has been marked as the solution to the initial question of the thread.
Ronald,

You can use chrtran() to convert bad characters:
lcBadChar = ""
for i = 1 to 32
   if ( ! inlist( i, 9, 10, 13 ) )
      lcBadChar = lcBadChar + chr(i)
   endif
endfor

lcOkMemo = chrtran( lcMemo, lcBadChar, space( len( lcBadChar ) ) )
>According to KB#315580 any characters below ASCII 32 (other than 9,10, and 13) will cause the "An Invalid character was found in text content". Does anyone have any suggestions for trapping for the existence of these characters so that XMLtoCursor will not fail? Or am I left to catch this error, call a routine to strip all such characters and then issue the XMLtoCursor again? In doing it this way, I am thinking I have to check for each (1-32 exect 9,10 and 13) or is there some other way to strip out?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform