Closed
Bug 598690
Opened 15 years ago
Closed 15 years ago
dom tree for xml nodes embedded in page built incorrectly if xml contains empty-element tag
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: pushkinsv, Unassigned)
Details
Attachments
(1 file)
659 bytes,
text/html
|
Details |
User-Agent: Opera/9.80 (X11; Linux i686; U; ru) Presto/2.6.30 Version/10.62
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.1.12) Gecko/20100911 Iceweasel/3.5.12 (like Firefox/3.5.12)
When using embedded xml data inside the <XML> tag of html page
there is a mismatch in <XML>'s element dom representation and it's
actual content - nodes that come after empty-element tag are fall into this
element as children instead of being siblings successors as should be.
Replacing empty-element tag with pair of start-tag and end-tag workarounds this bug.
Reproducible: Always
Steps to Reproduce:
1. Create a html page containing <XML> element which contains empty-element tag:
<xml id="xmldata2">
<root>
<child1>child1</child1>
<child2/>
<child3>child3</child3>
<child4>child4</child4>
</root>
</xml>
2. Open page in browser
3. Analyze DOM tree of <XML> element
Actual Results:
Firebug displays incorrect DOM-tree at this element:
<xml id="xmldata2">
<root>
<child1>child1</child1>
<child2>
<child3>child3</child3>
<child4>child4</child4>
</child2>
</root>
</xml>
Expected Results:
Firebug should display following DOM-tree at this element:
<xml id="xmldata2">
<root>
<child1>child1</child1>
<child2/>
<child3>child3</child3>
<child4>child4</child4>
</root>
</xml>
see HTML testcase in attachment, it contains html page with two equivalent XML elements, that should produce identical DOM-trees (but they don't), and simple dom tree viewer.
Updated•15 years ago
|
Component: XML → HTML: Parser
QA Contact: xml → parser
Reporter | ||
Comment 1•15 years ago
|
||
![]() |
||
Comment 2•15 years ago
|
||
There's nothing special about the <xml> tag in HTML. It's parsed as any other HTML tag, as are its descendants. In particular, they are parsed using the HTML parser, not the XML one.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•