#6693 closed feature (fixed)
Add cross-browser XML parsing support
Reported by: | dmethvin | Owned by: | jaubourg |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | core | Version: | 1.4.2 |
Keywords: | xml parse parseXML needsTest | Cc: | |
Blocked by: | Blocking: |
Description
As documented, the $("<html string>") method only supports parsing HTML strings, but users often try to parse XML strings with it. This doesn't work since jQuery uses the .innerHTML property for parsing and implicitly enforces HTML rules on the string. IE in particular will throw errors or misparse XML strings passed to $() in this way.
It is unlikely that $("<xml string>") can be implemented because it isn't trivial to differentiate an XML string from an HTML one. Perhaps a $.parseXML("<xml string>") method?
Change History (12)
comment:1 Changed 13 years ago by
Milestone: | 1.4.4 → 1.5 |
---|
comment:2 Changed 13 years ago by
Priority: | → undecided |
---|---|
Status: | new → open |
comment:5 Changed 12 years ago by
Owner: | set to jaubourg |
---|---|
Status: | open → assigned |
The logic already exists in ajax since the rewrite, it's really just a question of testing it further and exposing it.
comment:8 Changed 12 years ago by
parseXML is in the deferred branch. So the branch needs reviewing and merging. On a side note, do we have unit tests for this? Can we compile a list of documents & expressions to build them?
comment:9 Changed 12 years ago by
Priority: | undecided → high |
---|
comment:10 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The branch has been merged in so this is fixed, except I'd very much appreciate help on building unit tests for this.
comment:11 Changed 12 years ago by
Keywords: | parseXML needsDocs needsTest added |
---|
comment:12 Changed 12 years ago by
Keywords: | needsDocs removed |
---|
Retarget all enhancements/features to next major version.