2008 Jul 01 12:11 PM
Hi,
I´m reading XML data by using iXML classes. One XML file I´m reading contains header and
item data.
Right now I´m starting with reading the header attributes and then read all nested nodes and their attribute data. That works all fine, but now I had the error, that the XML file wrongly didn´t contain the items.
My XML reading method then ended up in a dump because the node was null:
l_node = l_iterator->get_next( ).Can anybody give me an advice, how to check at the beginning of reading my xml data, if a specific node (in my case the node for items) exists in the XML data? If not, I want to stop with an error message. I want to check that at the beginning, before reading all element data, to keep my method structured.
Thank you very much!
2008 Jul 01 12:32 PM
Hi,
You can create a filter and set that filter to the iterator. If this is done the iterator returns you only the node with a specific node name or node ID.
You can also check the parsing in the following WIKI code gallery
https://wiki.sdn.sap.com/wiki/x/JoDmAQ
Subroutines create_set_filter_attribute and parse_xml_file would be helpful.
2008 Jul 01 12:32 PM
Hi,
You can create a filter and set that filter to the iterator. If this is done the iterator returns you only the node with a specific node name or node ID.
You can also check the parsing in the following WIKI code gallery
https://wiki.sdn.sap.com/wiki/x/JoDmAQ
Subroutines create_set_filter_attribute and parse_xml_file would be helpful.