Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-19 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found