QuiX-Tool Suite Twitter demo

Tom Sebatian

We illustrate the QuiXTool-Suite for querying and transforming XML
stream. In particular, we show how to
use XPath and XSLT for querying and transforming Twitter streams.

How do I get a login?

To request a login, click here.

Run XPath and/or XSLT over Twitter’s global stream of Tweet data.

Usage:
twitter –xpath [–output file] [–time timeInSeconds]
twitter –xslt [–output file] [–time timeInSeconds]

XPath

Use XPath to select any subtree of the stream. E.g. all english tweets:

> twitter --xpath “//tweet[./object/lang[contains(.,’en’)]]”

Be aware that XPath queries selecting twees output a huge tweet-subtree. For displaying only the text of tweets you may run the following query:

> twitter --xpath “//tweet/object/text[contains(.,’love’)]/value/string/text()”

As the Twitter stream is infinite, you may want to set the time of processing (in seconds). The default processing time is 5 seconds.

> twitter --xpath “//tweet/object/text[contains(.,’love’)]/value/string/text()” --time 60

XSLT

Transform Twitter’s stream via XSLT. E.g. create a table with all tweets containing ‘love’ using a sample style-sheet “tweetsInTable”, or create and upload your own style-sheet.

> twitter --xslt /share/tweetsInTable.xslt --output out.html --time 60

Troubleshooting

Problem:
TwitterException when connecting to twitter.

Test Machine is out of sync.

Solution:
Contact QuiX-Proc team: xml-streaming@inria.fr

QuiX-Tool Suite
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.