Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to retrive characters from xml document

Status
Not open for further replies.

hemantsoundankar

Programmer
Feb 23, 2010
1
IN
Hi all,

<?xml version="1.0"?>
<query>
<dbname>Postgres</dbname>
<tables>
<rdbmsDbTable>SELECT datname,oid FROM pg_database</rdbmsDbTable>
<rdbmsDbInfoTable>SELECT oid, version(), pg_database_size(datname) FROM pg_database</rdbmsDbInfoTable>
</tables>

<dbname>MySQL</dbname>
<tables>
<rdbmsDbTable>SELECT schema_name FROM information_schema.schemata</rdbmsDbTable>
<rdbmsDbInfoTable>select variable_value from information_schema.global_status where variable_name=\"COM_BACKUP_TABLE""</rdbmsDbInfoTable>
</tables>
</query>




In the above XML doc, i want to retrive the character data for a specific tag.
for eg. If i want the character data for rdbmsDbInfoTable then it should compare that element name and retrive the character data for me, skipping rest of the file.
I am using xerces library, implementing in C on linux platform, and using SAX2.
Please post the solution if possible.

Thanks in advance,
--Hemant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top