1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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,285
    Likes Received:
    364
    Trophy Points:
    83
    Loop through the characters read till you find <person as the characters.
     

Share This Page