Comments (5)
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 [email protected]
on 25 Nov 2014 at 6:30
from x2js.
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 [email protected]
on 25 Nov 2014 at 10:00
from x2js.
Original comment by [email protected]
on 25 Nov 2014 at 10:00
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from x2js.
Oh... I totally forgot about XML namespaces! Thanks a lot, that solved the
issue of course! :)
Original comment by [email protected]
on 26 Nov 2014 at 9:57
from x2js.
np
Original comment by [email protected]
on 27 Nov 2014 at 3:44
- Changed state: Done
from x2js.
Related Issues (20)
- trim() in IE8 HOT 2
- IE9 DOM Exception HOT 6
- namespace url does not properly convert from json to xml HOT 3
- Decode problem in Firefox v30 and IE10 HOT 8
- asArray(undefined) == [undefined] HOT 4
- ReferenceError: "ActiveXObject" is not defined error thrown HOT 6
- Option to use double quotations for XML attribute values HOT 2
- can't use escaped characters HOT 2
- namespaces not working in chrome HOT 2
- 'Not enough storage is available to complete this operation' occurs in IE when parsing long XML string
- Set a null prefix HOT 3
- Javascript syntax error Firefox - demo.html HOT 3
- ape HOT 1
- Namespaces stripped from elements but not attributes HOT 1
- Request: Ignoring invalid XML element names from object properties HOT 3
- / is escaped but should NOT be escaped HOT 2
- escape "&" caractere HOT 1
- official github repo HOT 1
- unable to run published demo HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from x2js.