• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

getting tag names

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have the following xml documents:
<Control>
<Item>
<EP>
<EPName>epname1</EPName>
<TASK>
<TASKKey>taskname1</TASKKey>
<ACTION>
<ACTIONName> TESTing </ACTIONName>
</ACTION>
</TASK>
<TASK>
<TASKKey>taskname2</TASKKey>
<ACTION>
<ACTIONName> TESTing2 </ACTIONName>
</ACTION>
<ACTION>
<ACTIONName> TESTing3 </ACTIONName>
</ACTION>
</TASK>
</EP>
<PO>
<POKEYS> sss </POKEYS>
<ORDERITEM>
<ITEMName> GOOD To Eat </ITEMName>
</ORDERITEM>
<ORDERITEM>
<ITEMName> GOOD To Eat </ITEMName>
</ORDERITEM>
</PO>
</Item>
<Item>
<EP>
<EPName>epname2</EPName>
<TASK>
<TASKKey>taskname1</TASKKey>
<ACTION>
<ACTIONName> TESTing11 </ACTIONName>
</ACTION>
<ACTION>
<ACTIONName> TESTing22 </ACTIONName>
</ACTION>
</TASK>
<TASK>
<TASKKey>taskname2</TASKKey>
<ACTION>
<ACTIONName> TESTing33 </ACTIONName>
</ACTION>
</TASK>
</EP>
<PO>
<POKEYS> sss </POKEYS>
<ORDERITEM>
<ITEMName> GOOD To Eat </ITEMName>
</ORDERITEM>
<ORDERITEM>
<ITEMName> GOOD To Eat </ITEMName>
</ORDERITEM>
</PO>
</Item>
</Control>
Is there a way to get the Tag name at a certain level without knowing its
name? Like the third level tag is 'EP' and we want to get the string 'EP'.
Or can we get a vector of tag names at the Third level.
Or can we get a vector of elements at the third level and then get the tag
names from the elements?
Also can we get an Element from another Element.
will appreciate if someone can show me some working codes.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic