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.
-
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.
|