Bug Tracker

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#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 snover

Milestone: 1.4.41.5

Retarget all enhancements/features to next major version.

comment:2 Changed 13 years ago by snover

Priority: undecided
Status: newopen

comment:3 Changed 13 years ago by dmethvin

#4617 is a duplicate of this ticket.

comment:4 Changed 13 years ago by dmethvin

See #4617 for more discussion.

comment:5 Changed 12 years ago by jaubourg

Owner: set to jaubourg
Status: openassigned

The logic already exists in ajax since the rewrite, it's really just a question of testing it further and exposing it.

Last edited 12 years ago by jaubourg (previous) (diff)

comment:6 Changed 12 years ago by dmethvin

#7833 is a duplicate of this ticket.

comment:7 Changed 12 years ago by dmethvin

#7854 is a duplicate of this ticket.

comment:8 Changed 12 years ago by jaubourg

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 snover

Priority: undecidedhigh

comment:10 Changed 12 years ago by jaubourg

Resolution: fixed
Status: assignedclosed

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 jitter

Keywords: parseXML needsDocs needsTest added

comment:12 Changed 12 years ago by danheberden

Keywords: needsDocs removed
Note: See TracTickets for help on using tickets.