comp.text.xml
[Top] [All Lists]

Re: filling treeview from xml file, but only certain tags

Subject: Re: filling treeview from xml file, but only certain tags
From: Martin Honnen
Date: Thu, 31 Jul 2008 16:40:45 +0200
Newsgroups: comp.text.xml


minimalniemand wrote:
On 31 Jul., 15:15, Martin Honnen <mahotr...@xxxxxxxx> wrote:
   node.selectNodes("OPTEXT | ITEXT")

Will the hierarchy be kept in the resulting nodelist?

That expression returns a node list with child elements of name 'OPTEXT' and 'ITEXT', you can then add them to your tree view for the current level, then you can recursively process the next level. That way you would get a tree with the hierarchy being preserved although you obviously need to decide which nodes you add as none leaf nodes.


--

        Martin Honnen
        http://JavaScript.FAQTs.com/

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy