node-xml
node-xml copied to clipboard
XML namespace
Is there any way to create a xml element with namespace? For example:
<root xmlns:h="http://www.w3.org/TR/html4/">
<h:table>My table</h:table>
</root>
You can use _attr for namespaces.
Example:
[{
"root": [{
"_attr": {
"xmlns:h": "http://www.w3.org/TR/html4/"
}
}, {
"h:table": "My table"
}]
}]
I hope it helps and it's not too late.
Could you describe it in readme?
1.0.1 last npm publish 31/01/2016 with 8 pending PR not moving since years. I would have add more example but this repo seems frozen :/ (anyway thanks for this lib ! 👍 😄 )