Closed GoogleCodeExporter closed 8 years ago
Turns out X2JS works fine when using the mime type 'text/html', but the
DOMParser didn't like the short form of an element (<testnode />). When I
changed it to (<testnode></testnode>) it worked.
It would be nice to change the mime type using a parameter instead of digging
into the library.
As a side effect, all elements and attributes are in lowercase letters which
might come in handy in some use cases.
Original comment by weinberg...@gmail.com
on 25 Nov 2014 at 6:30
text/html - is actually isn't XML :) And if your XML is not well-defined in XML
terms, you probably need to use namespaces like this?
<container xmlns:my="test">
<test my:attrib="abc">
<d>hello world!</d>
</test>
</container>
{"container":{"test":{"d":"hello
world!","_my:attrib":"abc"},"_xmlns:my":"test"}}
Original comment by abdulla....@gmail.com
on 25 Nov 2014 at 10:00
Original comment by abdulla....@gmail.com
on 25 Nov 2014 at 10:00
Oh... I totally forgot about XML namespaces! Thanks a lot, that solved the
issue of course! :)
Original comment by weinberg...@gmail.com
on 26 Nov 2014 at 9:57
np
Original comment by abdulla....@gmail.com
on 27 Nov 2014 at 3:44
Original issue reported on code.google.com by
weinberg...@gmail.com
on 24 Nov 2014 at 5:37