on 03-23-2009 1:58 PM
Hi All,
I am trying to parse an XML file which structure is the following.
<Order>
<BookingCode>AAAAA</BookingCode>
<F1>
...
<F1>
<F2>
....
<F2>
<BookingCode>BBBBBB</BookingCode>
<F1>
...
<F1>
<F2>
....
<F2>
</Order>
More exactly I try to check all values of tag name "BookingCode" up to the end of the XML file. The number of occurrences of "BookingCode" is not determinated.
Is it necessary a loop after collecting a list of occurrences of "BookingCode"?
I am trying to use:
data: node_iterator type ref to if_ixml_node_iterator.
node_iterator = incode->CREATE_ITERATOR( ).
data: emp_node type ref to if_ixml_node.
emp_node = node_iterator->GET_NEXT( ).
data: emp_node_list type ref to if_ixml_node_list.
emp_node_list = emp_node->GET_CHILDREN( ).
data: emp_node_list_lenth type I.
emp_node_list_lenth = emp_node_list->GET_LENGTH( ).
Using the debugging I can not find exactly the behaviour.
Any suggestion for solving my issue will be well appreciated.
Thanks in advance.
Regards,
Giovanni
Hi,
Instead you can also loop at index
incode->get_item( index = x ).
data: outcode type ref to if_ixml_node.
outcode = incode->get_item( index = x ).
Edited by: Progirl Progirl on Mar 23, 2009 9:12 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
referring to a document in the net, I am trying to define the loop for understanding the behaviour but I receive the abend:
document: Understanding and working with ABAP Mapping (Steps to be followed in ABAP Mapping classes )
data: emp_node_list_iterator type ref to if_ixml_node_iterator.
data: emp_subnode type ref to if_ixml_node.
DO emp_node_list_lenth TIMES.
emp_subnode = emp_node_list_iterator->get_next( ).
....
Abend:
Runtime Errors OBJECTS_OBJREF_NOT_ASSIGNED_NO
Except. CX_SY_REF_IS_INITIAL
Thanks in advance for your kind support.
Regards,
Giovanni
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.