Toggle menu

xmldoc

A simple XML parser. If all you need to do is parse XML, use this one.

This library is distributed under the MIT license, its source and full documentation can be found at www.npmjs.com/package/xmldoc

Executed

Server-side.

Details

var xmldoc = require('xmldoc');

Example

function(params, credentials) {
    var xmldoc = require('xmldoc');
    var document = new xmldoc.XmlDocument("<people><person><name>Tim</name><age>34</age></person></people>");
    var result = document.valueWithPath("person.name");
    return result;
}

Result:

{
    "jsonrpc": "2.0",
    "id": 154,
    "result": "Tim"
}

Last modified on 30 June 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon