tuananh / camaro

camaro is an utility to transform XML to JSON, using Node.js binding to native XML parser pugixml, one of the fastest XML parser around.
MIT License
556 stars 29 forks source link

fix: should be able to parse template as array as well #97

Closed tuananh closed 4 years ago

tuananh commented 4 years ago

Attempt to fix related issue in #96

This should be valid

const xml = `
        <root>
            <item>1</item>
            <item>2</item>
            <item>3</item>
        </root>
    `
const result = await transform(xml, ['root/item', 'number(.)'])