Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I've been using and looking to use even more the node query XML generator, which is wonderful (thank you, vroom). use seems to be like this:

http://www.perlmonks.org/index.pl?node_id=37150&nodes=81921,87392,8522 +2
and you get back some XML, like this:
<NEWESTNODES><INFO site="http://perlmonks.org" sitename="Perl Monks">R +endered by the Node query XML Generator</INFO> <NODE nodetype="user" author_user="81921" node_id="81921" createtime=" +20010521060818">Vynce</NODE> <NODE nodetype="monkdiscuss" author_user="81921" node_id="87392" creat +etime="20010611020434">the state of perlmonks' perldocs</NODE> <NODE nodetype="note" author_user="81921" node_id="85222" createtime=" +20010602212719" parent_node="85220">Re: Re: Will/Can Perl 6 clean up +the bit-wise operator precedence mess?</NODE> </NEWESTNODES>
I note that currently, the following seem to be all the attributes available for any particular node:
nodetype
presumably something about the type of node -- they're shortened forms of the categories we know (e.g., "monkdiscuss" for "Perl Monks Discussion"), and generally pretty easy to decipher though, as far as i know, there is not, anywhere, a key to them. perhaps this would be wise, but it's not strictly necessary. Note that nodetype "user" indicates a monk's homenode (or the monk herself) and anything which is a reply to something else is a "note".
author_user
the author's homenode's node_id, which serves as a unique identifier for the monk himself.
node_id
unsurprisingly, the node ID number of the node.
createtime
the time at which the node was created. this is a long string of numbers, but it is not epoch time -- it is 'YYYYMMDDhhmmss' format. this is relatively easy for humans to read. it seems to be in UTC or perlmonks server time.
parent_node
if the node is a reply to another node, this attribute will exist and be the node_id of that other node.
(the content of the node element is the node's title. note that the body of the node is not passed anywhere.)

This is all wonderful and really great and shiny, but i notice that there are things available from perlmonks that are not in this little bit of XML; for instance, the content of the node, but that's perhaps excusable. The two new things that i would like to have passed in the XML are:

replies
whether this is just the number of replies, or actually a list of the replies, this would be vaguely useful.
top_ancestor
this is the one i really want. if you go to a node in perlmonks which is a reply to another node, you'll see (probably in the upper right corner, though i suppose you could use bizarre style sheets) a pair of links: "In reply to: ..." and "In thread: ...". what i humbly request of he who makes things go is that "in thread" node_id.
of course, i'm open to other suggestions for the names. thoughts, brethren?

.

In reply to request for another attribute of nodes in XML (node query, newest nodes, etc) by Vynce

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 drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-29 01:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found