Skip to main content

Bug Tracker

Side navigation

#6980 closed bug (invalid)

Opened September 01, 2010 06:17PM UTC

Closed September 02, 2010 02:06AM UTC

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.

Attachments (0)
Change History (1)

Changed September 02, 2010 02:06AM UTC by dmethvin comment:1

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.