Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


using expat parser how to build a tree shaped data structure of a xml document and read the value from it in c language

From: sharan <harioumsharan@-----.--->
To: NULL
Date: 11/3/2007 12:19:00 PM

using expat parser how to build a tree shaped data structure of a xml
document and read the value from it in c language so that whenever we
gave a key as a input it give the vale of that key.
i have to do this without using DOM and Schema, just make a general
tree from xml document which contains the tag value and attribute
value on each node.
means root node have user, its child node user1, user2, user3, and
each child node have  name, age, department and each node have this
key  along its value(either text or attributes value)
my xml file is:
<?xml version="1.0"?>
<users>
     <user id="1" text="hello">
         <name> Hari Oum </name>
         <age> 24 </age>
         <department> Product Development </department>
     </user>

<user id="2">
         <name> Sandeep </name>
         <age> 23 </age>
         <department> VoiceXML Applications </department>
     </user>

<user id="3">
         <name> Jeganathan </name>
         <age> 24 </age>
         <department> Java Applications </department>
     </user>

</users>
if i give the key for user2 --name than it print Sandeep if give for
user 3 key --age then it will print 24, so please help me without use
DOM and schema. i have little bit idea about expat parser.



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent