Closed Bug 206729 Opened 23 years ago Closed 23 years ago

After loading an XML document, when performing a search for childNodes of particluar element, it gives all the descendants, not just the child nodes

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 26179

People

(Reporter: jmplun, Unassigned)

Details

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) Build Identifier: Mozilla 1.3.1 If I load an Xml document, and pull out a particular element. If I then use myElement = element.childNodes; It will return to me all descendent nodes, not just child nodes. ie if I had <Parent> <Title> SomeText </Title> <Parent> it will tell me I have two child nodes, when by w3c spec, the Text Node is actually the child of the Title Node ( or grandchild of Parent) Reproducible: Always Steps to Reproduce: 1.load document 2.searchForelementByTagName 3.getChildNodes 4.Look at results Actual Results: I get all the descendant nodes Expected Results: I only want the child nodes
There is a #text node inside <parent> but before the <title> node... (look at the DOM in DOM inspector, and make sure display of whitespace-only nodes is enabled). *** This bug has been marked as a duplicate of 26179 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Component: DOM: Core → DOM: Core & HTML
QA Contact: desale → general
You need to log in before you can comment on or make changes to this bug.