[xerces-c] How to access a particular node?

R

Rene

Hi,

Newbie alert...
I'm using Xerces-C as a DOM parser.
I got it validating, and can retrieve/walk my XML nodes.
However, I'm missing some functionality.

Given this example XML file:

<companies>
<company1>
<address>
<street/>
<phone/>
</address>
<managers>
<ceo>
<name/>
<phone/>
</ceo>
<cio>
<name/>
<phone/>
</cio>
</managers>
</company1>
<company2>
<...>
</company2>
</companies>

When I want the phone# of company1 I can of course walk my nodes and
finally arrive at company1/address/phone, but this is cumbersome
Using getElementsByTagName("phone") will receive *all* phone nodes, so
not only that of company1 but also of all managers.
I'd like to use something like get
getElement("/company1/address/phone").
I believe MSXML has something like this (getSingleNode?).
Is this also possible in Xerces-C?

Thanks,
Rene
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top