Simple RDF writer or good tutorial?
uche at ogbuji.net
Wed Oct 8 16:11:02 CEST 2003
"Andrew Dalke" <adalke at mindspring.com> wrote in message news:<loFgb.1749$dn6.742 at newsread4.news.pas.earthlink.net>...
> > Note that you can't really use RDFlib's .save() method to write RSS files
> > that most aggregators can parse, because RDFlib will write out the triples
> > in arbitrary order, and most RSS parsers don't use a real RDF parser, so
> > they expect elements to be in a certain order.
> A goal of XML was to make it easy to write parsers. Despite tools
> like XMLGenerator, people insist on using print/write to generate XML
> output, and often forget to escape elements correctly. The result is
> "XML" output that isn't XML, with unescaped text like "AT&T". This
> is especially a problem in the RSS world so cause people like Mark
> Pilgrim to write an "Ultra-liberal RSS parser" to workaround those errors,
> Thus was have people using the wrong tools to write output, causing
> others to write specialized tools to capture wild type data, again raising
> the bar on getting data from point A to point B.
No reason why Pythoneers can't be good citizens:
But to the point, the OP cannot expect to get order from a naturally
unordered system (RDF). I can't see how this points to any failure in
XML. You would have the exact same problem trying to get portable
order out of a Python dictionary (or 2.3 set).
More information about the Python-list