<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: iXML - Checking if a specific node exists in XML data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ixml-checking-if-a-specific-node-exists-in-xml-data/m-p/4133086#M988332</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also check the parsing in the following WIKI code gallery&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.sdn.sap.com/wiki/x/JoDmAQ" target="test_blank"&gt;https://wiki.sdn.sap.com/wiki/x/JoDmAQ&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subroutines create_set_filter_attribute and parse_xml_file would be helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Jul 2008 11:32:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-01T11:32:19Z</dc:date>
    <item>
      <title>iXML - Checking if a specific node exists in XML data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ixml-checking-if-a-specific-node-exists-in-xml-data/m-p/4133085#M988331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I´m reading XML data by using iXML classes. One XML file I´m reading contains header and&lt;/P&gt;&lt;P&gt;item data.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;My XML reading method then ended up in a dump because the node was null:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;l_node = l_iterator-&amp;gt;get_next( ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 11:11:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ixml-checking-if-a-specific-node-exists-in-xml-data/m-p/4133085#M988331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T11:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: iXML - Checking if a specific node exists in XML data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ixml-checking-if-a-specific-node-exists-in-xml-data/m-p/4133086#M988332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also check the parsing in the following WIKI code gallery&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.sdn.sap.com/wiki/x/JoDmAQ" target="test_blank"&gt;https://wiki.sdn.sap.com/wiki/x/JoDmAQ&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subroutines create_set_filter_attribute and parse_xml_file would be helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2008 11:32:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ixml-checking-if-a-specific-node-exists-in-xml-data/m-p/4133086#M988332</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-01T11:32:19Z</dc:date>
    </item>
  </channel>
</rss>

