>>>> tag = readCurrentXmlTag();
>>>> cout<<"tag is : "<<endl; //??????????????
>>>> while( tag != "/branch")
Instead do
while( (tag = readCurrentXmlTag()) != "/branch")
With that the while will read the next tag at begin of each cycle.
>>>> I am implementing alex idea
The q. is a follow up of http:Q_24809171.html.
It is to parse a XML tree into a Tree class. The "idea" was to handle all children of a node (leafs or branches) in a loop rather than to handle siblings with a recursive call. Then the recursive call only happens for a new branch.
Main Topics
Browse All Topics





by: Infinity08Posted on 2009-11-01 at 23:31:15ID: 25717551
>> I am implementing alex idea.
Which idea is that ?
>> I am having little bug here.
What kind of bug ? How does it manifest itself ?
>> i can't get the return value from readCurrentXmlTag() .
What do you mean by that ? Could it have anything to do with the exit(1) that is still in that function ?