Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-21-2009, 06:15 PM   #1
LQ Newbie
Registered: Aug 2007
Posts: 13

Rep: Reputation: 0
Question XML parsing using DOM & Xerces on C++


We developing a product where we are reading an tchar *buffer which is in XML format. The XML is a nested XML tree. I need to traverse this XML recursively to create various required obj from the XML string.

I am using XercesC 2.8 for the same. I am able to pare & fetch simple XML tree and create back the XML buf from the object info. For eg. from the below mentioned XML I can create an Object of class CHouse & vice-a-versa
<HouseOwner>Amit P</HouseOwner>
<HouseStreet>ABC Hw</HouseStreet>
<HouseAdd1>asjas asf</HouseAdd1>

But when the XML complicates like:
<HouseOwner>Amit P</HouseOwner>
<HouseStreet>ABC Hw</HouseStreet>
<HouseOwner>Tom H</HouseOwner>
<HouseStreet>VHA NHw</HouseStreet>

How do I parse it using Xerces. I am facing problem when I try to get the inner XML, say I hot the node of Tag "City", then there are two Tags by the name "Area1" & "Area2" which are to be converted into Object of some class.

If anyone has worked on XercesC please help me.

Any pointers on this would be appreciated. I have searched a lot on web, but could not find any thing relevant. Even the smaples of Xerces are of no help

Plzz Help!!!



parsing, xml

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting attribute using xerces DOM in java mohtasham1983 Programming 1 10-27-2007 10:58 PM
C++ XML DOM parser? pembo13 Programming 1 02-05-2006 04:16 PM
errors building xerces xml parser on SLES 9 (i586) nkshirsagar SUSE / openSUSE 0 05-02-2005 09:12 AM
anyone familiar with the xerces xml parser used by apache? zovres Programming 0 03-16-2004 12:58 PM
Xerces, Xalan -- XML + XSL = HTML marktaff Linux - Software 1 10-15-2002 11:01 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:13 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration