July 5th, 2002

(no subject)

I have an xml handling question for the XMLRPC interface in C#

How do I handle < (left angle bracket)and > (right angle bracket)within the text of an entry when posting it to the server? do I use &lt and &gt? do I XmlEncode the entire entry (with the _xFFFF etc)?

I must... or I can see the following problem happening.

<member>
<name>event</name>
<value>This is my entry <livejournal-cut text="this is why its a problem">. This is some more of my entry </value>
</member>

Unless I'm mistaken, that is invalid XML. And obviously I have no control over the user having well formed XML in the text of the entry. The same sort of problem applies to other characters that are reserved like an _x**** sequence. Any ideas?