FWIW, here a found a partial solution ...

Adding a parameter displaytype with the value xml to the vote request/form will result in returning an xml instead of HTML.

For instance

<node id="1202729" title="regex replace a string" created="2017-11-03 +19:37:29" updated="2017-11-03 19:37:29"> <type id="115">perlquestion</type> <author id="1139608">OldChamp</author> <data> <field name="doctext"> <p> In a text file there are constant string1, for example Event "?" f +ollowed by some text and then a string2, which is spacebspace- or spa +cewspace-.</p> <p> I want to replace string1 with Event "Black to move" or Event "Whi +te to move" dependant on srting2.</p> </field> <field name="reputation">-2</field> </data> </node>

Load wise it's still not optimal, because the raw content of the root post is still returned in field doctext but it's OK for an XML-HTTP-request.

One can also vote on posts of the subtree, but the resulting reputation is not included, and needs to be gathered separately.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!


In reply to Re: Lightweight interface to cast votes? by LanX
in thread Lightweight interface to cast votes? by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.