Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

elementtree-raw

vpetrov160.1.5

A slightly modified version of the XML Serialization and Parsing module based on Python's ElementTree.

xml, sax, parser, serialization, elementtree, _raw hack

readme

elementtree-raw

This is a modified version of the original node-elementtree library. It will output unescaped XML strings. Do not use this hack unless you understand the implications.

node-elementtree is a Node.js XML parser and serializer based upon the Python ElementTree v1.3 module.

Installation

$ npm install elementtree-raw

Using the library

For the usage refer to the Python ElementTree library documentation - http://effbot.org/zone/element-index.htm#usage.

Supported XPath expressions in find, findall and findtext methods are listed on http://effbot.org/zone/element-xpath.htm.

License

node-elementtree is distributed under the Apache license.

changelog

elementtree-raw v0.1.5 (_raw hack)

  • The XML writer will output unescaped strings if an element contains a '_raw' property. This allows HTML strings to be written. A better solution is to support multiple text values per element (for cases when a tag is in the middle of a text value, e.g. I'm in the middle of something

elementtree v0.1.5 (in development)

  • Fix a bug in the find() and findtext() method which could manifest itself under some conditions. [metagriffin]

elementtree v0.1.4

  • Allow user to use namespaced attributes when using find* functions. [Andrew Lunny]

elementtree v0.1.3

  • Improve the output of text content in the tags (strip unnecessary line break characters).

[Darryl Pogue]

elementtree v0.1.2

  • Allow user to pass 'indent' option to ElementTree.write method. If this option is specified (e.g. {'indent': 4}). XML will be pretty printed. [Darryl Pogue, Tomaz Muraus]

  • Bump sax dependency version.

elementtree v0.1.1 - 2011-09-23

  • Improve special character escaping. [Ryan Phillips]

elementtree v0.1.0 - 2011-09-05

  • Initial release.