Bug Tracker

Opened 13 years ago

Closed 13 years ago

#6980 closed bug (invalid)

self closed tags not well handled by .find()

Reported by: johnccr Owned by:
Priority: Milestone: 1.4.3
Component: traversing Version: 1.4.2
Keywords: self-closed tags embedded xml Cc:
Blocked by: Blocking:

Description

I have embedded XML in HTML and wanted to use find to traverse it, while this worked very well in IE7, on firefox3 was a mess, after some testing I realized it was because of self-closed tags. So the following XML <Section id="6" name="Compliance">

<Requirement id="6.1">

<Description>Compliance</Description> <AppliesTo>

<Characteristic></Characteristic>

</AppliesTo> <Recommendations>

<General>Identify compliance required by your application</General> <Java></Java> <DotNET></DotNET> <PHP></PHP>

</Recommendations>

</Requirement>

</Section>

will become

<Section id="6" name="Compliance">

<Requirement id="6.1">

<Description>Compliance</Description> <AppliesTo>

<Characteristic></Characteristic>

<Recommendations>

<General>Identify compliance required by your application</General> <Java> <DotNET> <PHP></PHP>

</DotNET>

</Recommendations>

</Requirement>

</Section>

</Java>

If I change the <Java/> tag to <Java></Java> traversing works fine.

Change History (1)

comment:1 Changed 13 years ago by dmethvin

Resolution: invalid
Status: newclosed

I have embedded XML in HTML and wanted to use find to traverse it

Is your doctype XML, XHTML, or HTML? The browser will change the way it parses the document based on that. Please reopen with a test case so it's clear what is happening.

Note: See TracTickets for help on using tickets.