@syolab/xml_helper
v1.1.1
Published
xml helper
Downloads
6
Readme
Xml Helper
This is an XML Helper
Installing with npm
npm install @syolab/xml_helper --save
using in node js
create client
const xmlhelper = require('@syolab/xml_helper');
usage
// returns xml-dom from string
let dom = xmlhelper.getDomFromText(xmlString);
// returns string from xml-dom
let text = xmlhelper.getTextFromDom(xmlDom);
// parse xmlstring to js object
let obj = xmlhelper.getObjectFromXmlText(xmlString)
//set all xml-nodes to value
xmlhelper.setXmlNodeValue(xmlDom, tagName, value)
//returns value of first dom node that matches tagName
xmlhelper.getXmlNodeValue(xmlDom, tagName)