Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Iterating through DOM tree using an Iterator

Reply
Thread Tools

Iterating through DOM tree using an Iterator

 
 
hajer hajer is offline
Junior Member
Join Date: Oct 2011
Posts: 1
 
      10-20-2011
Hello,

I'm creating a C++ program that manipulates xml files using DOM tree and MSXML parser. I have to iterate through this DOM tree. It can be possible using methods like GetNextSibling, GetFirstChild, GetParent,...
But what I want to do when iterating is to be able to go directly to the next node in the structure, without having to test wether I need to call GetNextSibling, GetFirstChild or GetParent
For example let's say I have this xml file structure

<A>
<B>
<E/>
<F/>
</B>
<C/>
<D/>
</A>

I want to use some iterator that will allow me to call a certain GetNext method or something like that in such a may that I can iterate through this structure like that :
A - B - E - F - C - D

I already implemented a logic to do so, but I want to know if there is a ready to use one, so I don't have to reinvent the wheel.

Thanks in advance for any help or advice.

Hajer OUALHA
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Iterating a std::vector vs iterating a std::map? carl C++ 5 11-25-2009 09:55 AM
How does std::set implement iterator through red black tree? Fei Liu C++ 11 06-29-2007 02:02 PM
insert E4X XML tree inside existing DOM tree Joris Gillis XML 2 06-16-2006 08:30 PM
RE: Iterating generator from C (PostgreSQL's pl/python RETUNSETOF/RECORD iterator support broken on RedHat buggy libs) Hannu Krosing Python 0 05-15-2006 08:33 PM
B tree, B+ tree and B* tree Stub C Programming 3 11-12-2003 01:51 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57