on 02-05-2009 8:01 PM
Hi All
I am using ABAP mapping.
After getting children of the root node, i create an iterator by the following statements:
node_collection = root_node->get_children( ).
node_iterator = node_collection->create_iterator( ).
Now, In a loop, i want to get all the children in sequence. So, in the loop i am writing this statement:
child = node_iterator->get_next( ).
For the first iteration in the loop, 'child' gets the first child. But, for the second iteration, the 'child' value is becoming NULL.
Am i doing anything wrong? How can i fix this?
Thanks
Chandra
Hi Chandra,
you should first check the existence of the node in something like:
lo_xml_iterator = lo_xml_node_coll->create_iterator( ).
lo_xml_node = lo_xml_iterator->get_next( ).
while not lo_xml_node is initial.
lo_xml_node = lo_xml_iterator->get_next( ).
endwhile.
Regards,
Sergio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.