Hi All, I am trying to fetch data details from an XML file which contains XML code of an Process Model.When I try to fetch the name , UUID or Pv's data using the following syntax for PV's : xpathdocument( docId , "processModelHaul/process_model_port/pm/pvs/pv[1]/name" )
for UUID : xpathdocument( docId , "processModelHaul/process_model_port/pm/meta/uuid" )
for Name : xpathdocument( docId , "processModelHaul/process_model_port/pm/meta/name/string-map/pair[1]/value" )
I am getting no response.when i checked in Community : https://docs.appian.com/suite/help/24.3/fnc_scripting_xpathdocument.htmlthere also it was mentioned the similar syntax that i am using.But still i am not getting why the I am getting null as output.
Thanks in advance.
Discussion posts and replies are publicly visible
You need to add "/" at the beggining of your expression
If that doesn't work, build the expression from scratch and check the results on each iteration.
xpathdocument( docId , "/*" ) --> This will return the whole xml
It it works, go to next level in the xml
xpathdocument( docId , "/processModelHaul/*" )
Do this until you have the whole expression...
Hi David,Thanks for your response,I have tried the way you suggested,and its working when i am trying to fetch the rolemap by using xpathdocument( docId: docId, expression: "/processModelHaul/roleMap/*")Bu it's not working when trying to fetch other details like name, uuid or Pv's which are under process_model_port
process_model_port is not a valid element or the namespace is incorrect.
Could you paste here the xml please?