Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

Urgent:SIMPLE Need help in getting the node rather than the value of node

here is what i am doing

xlist := xslprocessor.selectNodes(xmldom.makeNode(xdoc),'//DataSht/Parameters/*/Pass[text()=''false'']/..');
      htp.p( xmldom.getLength(xlist));
      FOR cur_emp IN 0 .. xmldom.getLength(xlist) - 1 LOOP
          xnode := xmldom.item(xlist, cur_emp);
          p_spec := xslprocessor.VALUEOF(xnode,'Pass');
      end loop;
i can get the value of all those pass nodes whose text is false. now i want to get this failed PASS node's parent value. how can i get it
1 Solution
Geert BormansCommented:
can you try something like this?
xlist := xslprocessor.selectNodes(xmldom.makeNode(xdoc),'//DataSht/Parameters/*[Pass[text()=''false'']]');
samir25Author Commented:
the problem is valueof

p_spec := xslprocessor.VALUEOF(xnode,'Pass');
I need to print the node not the value.

with you above change it gave error
ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00601: Invalid token in: '//DataSht/Parameters/*[Pass[text()='false']]'
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 900 ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 928 ORA-06512: at "WEBSTART.TEST1", line 194

if i remove /.. also (without adding a ]) then also i dont get the desired result. problem is i dont have to use valueof...it shoudl be something else.
using like getparentnode. but i am not able to use it
slightwv (䄆 Netminder) Commented:
Please provide a small test case.  This should include sample data and expected results.

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now