libxml2 and parsing

Discussion in 'XML' started by zen, Aug 3, 2005.

  1. zen

    zen Guest

    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.
     
    zen, Aug 3, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Victor Ng

    libxml2 and node identity

    Victor Ng, Jun 17, 2004, in forum: Python
    Replies:
    1
    Views:
    421
    Victor Ng
    Jun 23, 2004
  2. Replies:
    2
    Views:
    1,073
    Jean-Roch SOTTY
    Dec 5, 2005
  3. ankit

    libxml2 and mindom

    ankit, Dec 21, 2005, in forum: Python
    Replies:
    4
    Views:
    360
    ankit
    Dec 26, 2005
  4. Steve Ball
    Replies:
    0
    Views:
    2,784
    Steve Ball
    Nov 24, 2008
  5. Kevin Ar18
    Replies:
    1
    Views:
    549
    Stefan Behnel
    Nov 4, 2009
Loading...

Share This Page