S
sharan
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.
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.