<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>xpathdocument()</title><link>https://community.appian.com/discussions/f/rules/37700/xpathdocument</link><description>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&amp;#39;s data using the following syntax for PV&amp;#39;s : xpathdocument( docId , &amp;quot;processModelHaul/process_model_port</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: xpathdocument()</title><link>https://community.appian.com/thread/141655?ContentTypeID=1</link><pubDate>Sat, 12 Oct 2024 15:41:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:710646be-9469-4724-854a-c3d52efb6f31</guid><dc:creator>Soma</dc:creator><description>&lt;p&gt;Can you please share the XML data&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: xpathdocument()</title><link>https://community.appian.com/thread/141640?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2024 16:30:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8fb36b97-9b87-4a3c-9667-da11164371f2</guid><dc:creator>David Jimenez </dc:creator><description>&lt;p&gt;process_model_port is not a valid element or the namespace is incorrect.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you paste here the xml please?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: xpathdocument()</title><link>https://community.appian.com/thread/141626?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2024 15:00:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c43a31bb-35af-4d02-878b-b7c6c8663265</guid><dc:creator>Yogi Patel</dc:creator><description>&lt;p&gt;The following is working:&lt;/p&gt;
&lt;p&gt;xpathdocument(12345, &amp;quot;/processModelHaul//*[local-name()='pvs']&amp;quot;)&lt;/p&gt;
&lt;p&gt;Hope this will help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: xpathdocument()</title><link>https://community.appian.com/thread/141620?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2024 13:08:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:731dcedd-1603-4d20-9e59-114dc1c31589</guid><dc:creator>Yogi Patel</dc:creator><description>&lt;div data-olk-copy-source="MailCompose"&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;p&gt;it is&amp;nbsp;not working for process_model_port. Not sure about the reason. Other members might help.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Working:&amp;nbsp;xpathdocument(123, &amp;quot;processModelHaul/history&amp;quot;)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Not working: xpathdocument(123, &amp;quot;processModelHaul/process_model_port&amp;quot;)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;May be due to some namespace issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: xpathdocument()</title><link>https://community.appian.com/thread/141603?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2024 08:41:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:89f5be44-e654-403e-a553-b6a049248cd8</guid><dc:creator>Ramesh Palati</dc:creator><description>&lt;p&gt;Hi David,&lt;br /&gt;Thanks for your response,&lt;br /&gt;I have tried the way you suggested,&lt;br /&gt;and its working when i am trying to fetch the rolemap by using&amp;nbsp;&lt;br /&gt;xpathdocument(&lt;br /&gt; docId: docId,&lt;br /&gt; expression: &amp;quot;/processModelHaul/roleMap/*&amp;quot;&lt;br /&gt;)&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1728635582365v1.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Bu it&amp;#39;s not working when trying to fetch other details like name, uuid or Pv&amp;#39;s which are under&amp;nbsp;&lt;span&gt;process_model_port&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1728635724594v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: xpathdocument()</title><link>https://community.appian.com/thread/141599?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2024 07:36:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82ab9e34-d5a0-4850-91e4-228a0d684d34</guid><dc:creator>David Jimenez </dc:creator><description>&lt;p&gt;You need to add &amp;quot;/&amp;quot; at the beggining of your expression&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If that doesn&amp;#39;t work, build&amp;nbsp;the expression from scratch and check the results on each iteration.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;xpathdocument(&amp;nbsp;docId , &amp;quot;/*&amp;quot; ) --&amp;gt; This will return the whole xml&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It&amp;nbsp;it works, go to next level in the xml&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;xpathdocument(&amp;nbsp;docId , &amp;quot;/processModelHaul/*&amp;quot; )&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do this until you have the whole expression...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>