'Node.js' version of 'XPPq' ('xppq-node')
Description
This Node.js addon provides an XML parser and preprocessor.
Installation
Simply launch npm install xppq
.
For more details, see installation.
Usage
If you want to test, launch npm explore xppq -- node test.js
.
You can also take a look to this file for examples of use of xppq-node, and test them online on Runkit, where you can also test xppq-node with your own scripts.
Parser
To use the parser, you need to define a callback like this example. Then you call xppq.parse(stream,callback);
, like here, with stream
, a stream providing the XML data you want to parse, and callback
, the previous mentioned callback.
Preprocessor
The preprocessor (xppq.Stream
) is a stream which takes a stream providing the XML data, and provides also XML data. So, it can be inserted between a method which takes an XML providing stream, like the parser above, and the stream it handles, like in this example.
Other
See XPPq.