0.0.2 • Published 12 years ago
jsxml
Licence
—
Version
0.0.2
Deps
0
Vulns
0
Weekly
0
Jsxml
JavaScript utilities for parsing and working xml, mainly in jsonml in array form.
More info on JsonML at jsonml.org and wikipedia
This module implements the following functions:
jsxml.fromXml(xml_string)converts a string containing xml to jsonml in array formjsxml.toXml(jsxml_array)converts jsonml in array form to xmljsxml.toObject(jsxml_array)converts jsonml in array form to an easier subscriptable objectjsxml.childReduce(jsxml_array, callback_function(accumulator, child_element), initial_value)applies the callback function to each child element of the jsonml arrayjsxml.getAttr(jsxml_array, attribute)retrieves the value of a given attribute of the jsonml array or undefined if no attributes, or no attributes defined
Released under open source / MIT license