xml file reader

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sunilvadranapu
    New Member
    • May 2007
    • 1

    xml file reader

    HI,
    i have an xml file and i have to parse and modify its attributes values with given values.
    eg: File file has one attribute
    <Time>117854136 6</Time>
    i have to write a program to read this attribute and have to set with the given value.

    Could any one help in doing this??

    thanks in advance

    -SKumar
  • mac11
    Contributor
    • Apr 2007
    • 256

    #2
    There are lots of xml parsing tools/libraries that are already written that you can just use. Maybe look around the web for expat and libxml.

    Unless this is some school assignment and your not allowed to use a library to do the work for you. In that case your gonna have to bite the bullet and read/parse the file by hand. You'll have to build some sort of state machine to keep track of opening and closing tags. If this is an assignment provide some more details about the part thats giving you trouble...

    Comment

    Working...