xml file reading

Discussion in 'C' started by harish13, Sep 21, 2006.

  1. harish13

    harish13 New Member

    Joined:
    Jul 20, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    0
    hi,
    i have a xml file like this

    <detail>
    <person>
    <name>kshd</name>
    <age>22</age>
    </person>
    <person>
    <name>kshdrerewr</name>
    <age>24</age>
    </person>
    </detail>

    i opened this file using fopen and read some 2KBs into a buffer.
    what i want to do is i want to set the pointer to "person"(first occurance).
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Loop through the characters read till you find <person as the characters.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice