?

Log in

No account? Create an account
Stumped (Still) - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

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

Stumped (Still) [Dec. 14th, 2002|11:43 pm]
LiveJournal Client Discussions

lj_clients

[surfal666]
[mood |aggravatedaggravated]
[music |Nelly - Country Grammer]

So now that I've proven my brain is on vacation, once again I ask... Could someone much smarter than me explain why this
<?xml version="1.0"?>
<methodCall>
<methodName>LJ.XMLRPC.postevent</methodName>
<params>
<param>
<value><struct>
<member><name>props</name>
<value><struct>
<member><name>opt_backdated</name>
<value><int>1</int></value>

</member>
<member><name>opt_preformatted</name>
<value><int>1</int></value>
</member>
<member><name>opt_nocomments</name>
<value><int>0</int></value>
</member>
</struct></value>
</member>
<member><name>min</name>
<value><string>18</string></value>

</member>
<member><name>hour</name>
<value><string>16</string></value>
</member>
<member><name>day</name>
<value><string>11</string></value>
</member>
<member><name>mon</name>
<value><string>10</string></value>
</member>
<member><name>year</name>

<value><string>2002</string></value>
</member>
<member><name>subject</name>
<value><string>If it he weren't a vampire... [Grr! Argh!]</string></value>
</member>
<member><name>username</name>
<value><string>surfal666</string></value>
</member>
<member><name>hpassword</name>
<value><string>-nixed-</string></value>

</member>
<member><name>ver</name>
<value><int>0</int></value>
</member>
<member><name>lineendings</name>
<value><string>unix</string></value>
</member>
<member><name>event</name>
<value><string><p>If he weren't <i>Spike</i>... it would be <b>perfect</b>...</p><p>Buffy stared up at the ceiling, wondering where her bones had gone. How come the more they had sex, the more she wanted, and the better it got? Didn’t matter when, where, how, it was an addiction, except it didn’t make her feel bad. She couldn’t imagine lying comfortably, unabashedly naked with Riley, and not only not caring, but actually liking. There was an odd innocence to it, a complete absence of the guile she’d experienced with other men, where the goal had been to get some sort of control over her. Spike’s goal appeared to be to make her lose control as often and as enthusiastically as possible.</p> <br /> <p><a target="_blank" href="http://www.alanna.net/gin/affinity.html">Affinity</a> by <lj user="ginmar"></p><br /><br /><p>[cloned from <a href="http://frcooper.com/journal/index.php?p=190&amp;more=1&amp;c=1">Diary Of A Madman</a>]</p></string></value>

</member>
</struct></value>
</param>
</params>
</methodCall>

returns this error:
Application failed during request deserialization:
not well-formed (invalid token) at line 51, column 274, byte 1557 at /usr/lib/perl5/XML/Parser.pm line 185

I don't see any invalid tokens...
linkReply

Comments:
From: evan
2002-12-15 12:38 am (UTC)
You didn't close your lj tag?
(Reply) (Thread)
[User Picture]From: surfal666
2002-12-15 12:49 am (UTC)
the only lj tag is lj user and thats not specc'd as having a closing.
(Reply) (Parent) (Thread)
From: evan
2002-12-15 12:52 am (UTC)
(Reply) (Parent) (Thread)
[User Picture]From: surfal666
2002-12-15 01:03 am (UTC)
sorry - wrong answer. if I strip away the rest of the msg and just post the lj user without a closing tag, it goes through just fine.

(Reply) (Parent) (Thread)
[User Picture]From: kumokasumi
2002-12-15 06:03 am (UTC)

Because it's hard to tell...

a. The HTML /is/ being escaped for transport, right?
b. Which one is line 51? I don't trust my counting.
(Reply) (Thread)
[User Picture]From: surfal666
2002-12-15 09:22 am (UTC)

Re: Because it's hard to tell...

1) Yeah, it is - browsers (or at least Moz) unescapes it for display. Helpful. feh.
2) Seems to be the html block. (depending on how you count - I need to set up a local Lj server.)

I seem to have side-stepped the problem by by switching to protocol v1 and wrapping everything in utf8. That makes me think it's a problem with non-printing characters or punctuation - backticks and smart quotes, something isn't being escaped properly.

Of course now, I get occasional "Client Error"s but no report of what.







(Reply) (Parent) (Thread)
[User Picture]From: markpasc
2002-12-15 10:40 am (UTC)

Re: Because it's hard to tell...

Yeah, you would need to mark your XML with a different encoding (eg <?xml version="1.0" encoding="windows-1252"?>) if you want to use those.
(Reply) (Parent) (Thread)
[User Picture]From: surfal666
2002-12-15 10:47 am (UTC)

Re: Because it's hard to tell...

Well, it makes more sense from a design viewpoint to convert to utf8, as it saves having to figure out what character set to declare the text as. Let the computer do the work. That's what it is there for.


(Reply) (Parent) (Thread)