bojanbjelic / xml2json

Xml To Json

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Single element XML

gitsno opened this issue · comments

A very simple single element XML document does not work, for example:
<test a="one" />
This XML does not get matched by the main match
match="/*[node()]"
However if I remove the node test from that so the main match is simply
match="/*"
then the XML gets transformed as expected to
{"test" : {"a" : "one"}}
I tried it with more complex XML and it seems to still work, can you please let me know why the node test is there and what the negative impact of removing it will be?

Thanks

This has been resolved, merged the pull request from @ilyar #3