[xml] how to read the second node?

Hello again ,thank you very much ,I solved last problem but the new question is coming out :(
the format of xml is like this :
                <train number = "suX1">
                <train number = "suX2">
                <train1 number = "subX1">
I can use followed code: doc = xmlParseFile(docname);
                  cur = xmlDocGetRootElement(doc);
                          cur = cur->xmlChildrenNode;
                 cur = cur->next;//this point to <direct_train>;
to read the <timetable> as root node ;<direct_train> as its childrennode,but when I finish read the data in <direct_train>,I want to read data in <passing1_train>, do I need go back to the root node"<timetable>", and choose second
childrennode"<passing1_train>"? how can I do ?

thank you in advance

MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]