Ravi (indif69) wrote in lj_clients,
Ravi
indif69
lj_clients

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?

Subscribe
  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 8 comments