Friday, January 18, 2013

NodeTree 0.3 Released

I just wrapped up NodeTree version 0.3, a little over a year since the last release.

As promised, this release includes document and stream parsing with some very early use of XMPP. However, there's some basic features that haven't been implemented yet:

  • Namespace access from Python
  • XPath matching
  • XSLT support
  • CDATA blocks

For Concordance we're going to need at least XSLT support so I'm adding this next. While we're already storing XML data in libxml2 DOM on the backend, XSLT will take a bit more than simply binding libxslt due to the manner NodeTree objects bind to their respective libxml nodes.

XML namespace access also include some interesting challenges with the API, notably, how to expose the namespace prefix and/or uri with Element.name and Element.attributes.

There are also a few rough edges I haven't cleaned up yet such as being able to pass a generator (eg, File) to Document or Stream, exposing which documents an Element belongs to, or ensuring a node isn't added to the same document twice.

You can download NodeTree 0.3 from the Python Package Index and let me know what you think.

1 comment:

Unknown said...

Really glad you posted this, because I need to parse XML this week - for the first time in years - and I couldn't remember NodeTree's name! Thanks for showing it to me!