zstreams-xml-writer
Simple streaming XML writer intended to be paired with zstreams-xml-parser
for XML transforms.
It inputs event objects from the XML parser and outputs XML data.
This has the following caveats:
processinginstruction
,sgmldeclaration
,opennamespace
, andclosenamespace
events are ignored.attribute
events are not used. Attributes are taken from theopentag
event.- No validation is performed; events are expected to be in a valid order.
Example (uppercases all text in the document):
var zstreams = ;var XMLParser = ;var XMLWriter = ; zstreams ;