Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting attribute data from XML document's tags with XML::DOM

Status
Not open for further replies.

Windrider

Programmer
Jul 26, 2002
8
FI
Hi!

I'm currently using stream (or event) based parsing of XML document with XML::parser and it works quite well, but I'm also looking for alternatives.

If I would use XML::DOM as a tree walker (back/forward), I was wondering is there easy way to get all of the attributes of specific tag, e.g.

<COMPONENT id=&quot;Processor&quot; name=&quot;Pentium 4&quot; speed=&quot;2000&quot; />

and I would like to get all the attributes to array. Is there a way to do it. With stream based parsing it's quite easy, but I'm quite new to XML::DOM.

Br, Windrider
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top