Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Hopefully you haven't noticed, but the internals of the XML feeds have changed. They have been refactored into a new design that hopefully is easier to maintain and work with, as well being more efficient.

The main observable change is that the contents of the INFO tag is now along the same lines as the other tickers. However there are deeper changes.

  • First, The paramater 'fromid' may be used. This will return records newer than a certain record. The point of this is to prevent retransmitting unneeded data. Simply use the message id of the last record on the next fetch and you will get anything new.
  • Second, the parameter 'limit' may be used to change the default of returning the last 10 records. You may return as many records as you like.
  • Third, the parameter 'timeout' may be used to change the default time range of the returned records to something less than 10 minutes.
  • Fourth, the tickers now respect your ignore settings. So if you don't want this don't login for your fetches. (Ie use the anonymonk account to get the data and nobody will be ignored.)
  • Fifth, the two tickers can actually both produce the same output as each other, and a new format as well. Use 'xmlstyle' to override the behaviour, with the values 'old','new' and 'modern'*. (Postmodern will be next I'm sure :-) As the ticker output is cached it does not respect such xmlstyles as 'flat' and 'clean' as the others do. Such is life in the land of one size fits all. (Or in this case, three sizes fits all)
  • And finally, if this change has broken your client you can use the 'oldcache' option to revert back to the old behaviour. Hopefully this shouldn't be necessary however.

* That last bit, the 'modern' output style, is a new format entirely. It uses GMT based timestamps only, includes parsed and unparsed content, and uses both elements and attributes. Its intended to be used by tools using proper XML parsers. Anyway, its layout is entirely up to discussion and change, as its so new that we can do anything. I really look forward to hearing what client authors have to say. Here is a sample. (Newlines in the info tag added for legibility)

<chatter> <info site="http://perlmonks.org/" sitename="Perl Monks" ticker_id="15834" gentimeGMT="2005-11-06 23:35:35" xmlstyle="clean,modern" xmlmaker="XML::Fling 1.001" >Rendered by the Chatterbox XML Ticker</info> <message id="542068699" gmtime="2005-11-06 23:39:17" unixtime="1131320 +357"> <author user_id="108447">demerphq</author> <text>[id://108447]</text> <parsed>&lt;a href="?node_id=108447"&gt;demerphq&lt;/a&gt;&lt;!-- --&g +t;</parsed> </message> </chatter>

Update: atcroft helpfully pointed out that there is no need for a way to override your ignore list.

---
$world=~s/war/peace/g


In reply to New XML Chatter Stuff by demerphq

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, 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, 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.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others chanting in the Monastery: (4)
    As of 2020-06-05 01:26 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Do you really want to know if there is extraterrestrial life?



      Results (35 votes). Check out past polls.

      Notices?