Log in

No account? Create an account
LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Mar. 14th, 2005|04:36 pm]
LiveJournal Client Discussions

I am writing a client to post an entry to livejournal using xml-rpc protocol. According to the documentation, it accepts html code. However it doesn't work when the entry contains html code. Any idea will be appreciated.


[User Picture]From: marksmith
2005-03-17 06:52 pm (UTC)
Not enough information to help, Mark. You'd have to show us exactly what you're sending to the server, and what the server is responding with.
(Reply) (Thread)
[User Picture]From: anne78
2005-03-17 07:13 pm (UTC)
It might be because XML-RPC is XML based (obviously) so anything you send has to be well formed XML. I am assuming the HTML your sending is not. Therefor you will need to wrap the HTML in CDATA tags, e.g

If you are using a third party XML-RPC library then you will need to look at it's documentation to see if there is a peramiter to send HTML. Or just manualy send the CDATA tags round your XML.
(Reply) (Thread)
[User Picture]From: otheronetruegod
2005-03-17 07:13 pm (UTC)
Define "doesn't work".

I use XML-RPC with Chronicle and have no problems with sending HTML.
(Reply) (Thread)
From: m_leprae
2005-03-17 07:27 pm (UTC)
I just converted the angle brackets to > and < when I wrote my quick and dirty XML-RPC client.
(Reply) (Thread)
[User Picture]From: kemayo
2005-03-17 11:57 pm (UTC)
Did that actually work for posting, or did it just result in the tags being visible?
(Reply) (Parent) (Thread)
From: m_leprae
2005-03-18 01:55 am (UTC)
It worked for posting. I'd have to convert to > to make an angle bracket visible.

(Reply) (Parent) (Thread)
From: m_leprae
2005-03-18 02:00 am (UTC)


Putting the whole text to be posted inside a CDATA tag is the best way to do it. I just wanted to prepend an lj-cut to the text I was posting.
(Reply) (Parent) (Thread)