libxml2 and parsing

Z

zen

Hi,

I'm trying to use libxml2 (with C) to extract some elements from an xml doc
which is in memory.

I've managed to parse the memory buffer ok into an xmlDocPtr but can't
figure out the functions I should be using to extract a repeated set of
elements.

For example:

<person name="fred">123</person><person name="bert">345</person>...<person
name="harry">876</person>

How would I use a loop to pickup each person element in turn, and then
extract the name attribute, and the numeric value of the element?

Thanks in advance.
 

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
474,001
Messages
2,570,250
Members
46,848
Latest member
Graciela Mitchell

Latest Threads

Top