Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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":



  • 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? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2023-02-06 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (37 votes). Check out past polls.

    Notices?