Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

xpath,ixml,find_from_path_ns

Former Member
0 Kudos
327

Hello,

i am using the method find_from_path_ns of ixml library to get a node from my xml document.

for example:


<root>
  <childs>
    <child attr="1">
      <type>A</type>
    </child>
    <child attr="2">
      <type>B</type>
    </child>
  </childs>
</root>

When the path contains a condition (see below) i get no element back. What do i make wrong?

lp_path = '/root/childs/child[1]'.

lp_path = '/root/childs/child[@attr=1]'.

lp_path = '/root/childs/child[type=''B'']'.

lp_path = '/root/childs/child[type="B"]'.

lp_path = '/root/childs/child[type=B]'.

lr_xml_elem = lr_xml_doc->find_from_path_ns( default_uri = lp_uri path = lp_path ).

Thanks in advance

Sebastian

Message was edited by: Sebastian Rasp

Message was edited by: Sebastian Rasp

1 REPLY 1

Former Member
0 Kudos
112

The method find_from_path_ns won´t return a node when the path contains condition. It´s better to use method set_expression of cl_xslt_processor class.