Advertisement

09.02.2008 at 12:59PM PDT, ID: 23697231 | Points: 500
[x]
Attachment Details

getElementsByTagName api?

Asked by ram_0218 in Extensible Markup Language (XML), Java Programming Language

I'm trying to use getElementsByTagName api in w3c.Element. My XML structure is as:

<menu>
<name>name1</name>
<code>code1</code>
 <menu> -----------------menus can have children.. so submenus
  <name>name1-1</name>
   <code>code1-1</code>
 </menu>
 <menu> -----------------menus can have children.. so submenus
  <name>name1-1</name>
   <code>code1-1</code>
 </menu>
</menu>

so menus can have children and also be in the same level.. when i use
getElementsByTagName("menu") it retrieves the complete list of menus but not just the menus that have tag name as menu in the immediate next level.. but all levels.. which is why i cant use recursion to copy my whole menu xml to a tree based objects.. can anyone throw some ideas around this..Start Free Trial
[+][-]09.02.2008 at 01:05PM PDT, ID: 22371079

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.02.2008 at 01:06PM PDT, ID: 22371089

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.02.2008 at 02:59PM PDT, ID: 22372146

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.03.2008 at 07:53AM PDT, ID: 22377913

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.03.2008 at 08:05AM PDT, ID: 22378050

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628