<?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>Hi All,  I am trying to get xml data using xpathdocument(), The xml do</title><link>https://community.appian.com/discussions/f/general/6515/hi-all-i-am-trying-to-get-xml-data-using-xpathdocument-the-xml-do</link><description>Hi All, I am trying to get xml data using xpathdocument(), The xml document is saved in Appian(As attachment). xml document contains attribute xmlns=&amp;quot; http://www.adatum.com&amp;quot; at the root element. with out this attribute I can get the xml data. what could</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Hi All,&lt;br /&gt;&lt;br /&gt;I am trying to get xml data using xpathdocument(), The xml do</title><link>https://community.appian.com/thread/25606?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2015 16:28:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0bb497cd-a6e7-4297-b483-061798bc7c50</guid><dc:creator>Venu</dc:creator><description>Below is the code and attaching XML&lt;br /&gt;&lt;br /&gt;load(&lt;br /&gt;  a!paragraphField(&lt;br /&gt;    value:torecord(xpathdocument(95893,&amp;quot;/root/data&amp;quot;),ri!test),&lt;br /&gt;    height:&amp;quot;TALL&amp;quot;&lt;br /&gt;  )&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;here ri!test is the input to the interface of custom type (CDT Array)&lt;br /&gt;&lt;p&gt;&lt;a href="/cfs-filesystemfile/__key/communityserver-discussions-components-files/11/newxml.xml"&gt;newxml.xml&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi All,&lt;br /&gt;&lt;br /&gt;I am trying to get xml data using xpathdocument(), The xml do</title><link>https://community.appian.com/thread/25605?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2015 16:11:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4b850bf4-d927-47e2-a16a-936cf847c9cf</guid><dc:creator>PhilB</dc:creator><description>Could you post the xml and related expressions?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi All,&lt;br /&gt;&lt;br /&gt;I am trying to get xml data using xpathdocument(), The xml do</title><link>https://community.appian.com/thread/25599?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2015 15:10:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:04b5d1bf-7056-4aff-95ec-c1756f13968c</guid><dc:creator>Venu</dc:creator><description>Thanks Phil,&lt;br /&gt;&lt;br /&gt;i have another question, &lt;br /&gt;i have an xml file of 3 records(rows) and that didn&amp;#39;t have namespace.&lt;br /&gt;i used xpathdocument and torecord functions to save data in my cdt variable.&lt;br /&gt;xpathdocument give 3 records correctly, but torecord saves only the last row even the type variable is multiple (Array).&lt;br /&gt;&lt;br /&gt;this issue was resolved by some work around.&lt;br /&gt;&lt;br /&gt;here my question is: what could be the reason torecord saves only last record/row?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi All,&lt;br /&gt;&lt;br /&gt;I am trying to get xml data using xpathdocument(), The xml do</title><link>https://community.appian.com/thread/25597?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2015 14:39:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:86ac9efb-1e35-4283-98f3-5ca3e43cfb4d</guid><dc:creator>PhilB</dc:creator><description>You&amp;#39;ll need to create a rule that returns your CDT (example below) and then apply that rule across the result of the xpathdocument() using &amp;quot;/*[name()=&amp;#39;Tests&amp;#39;]/*[name()=&amp;#39;Test&amp;#39;]&amp;quot;.&lt;br /&gt;&lt;br /&gt;type!myCDT(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;name: xpathsnippet(ri!xml, &amp;quot;/*[name()=&amp;#39;Test&amp;#39;]/*[name()=&amp;#39;Name&amp;#39;]/text()&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;commandLine: xpathsnippet(ri!xml, &amp;quot;/*[name()=&amp;#39;Test&amp;#39;]/*[name()=&amp;#39;CommandLine&amp;#39;]/text()&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;input: xpathsnippet(ri!xml, &amp;quot;/*[name()=&amp;#39;Test&amp;#39;]/*[name()=&amp;#39;Input&amp;#39;]/text()&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;output: xpathsnippet(ri!xml, &amp;quot;/*[name()=&amp;#39;Test&amp;#39;]/*[name()=&amp;#39;Output&amp;#39;]/text()&amp;quot;&lt;br /&gt;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi All,&lt;br /&gt;&lt;br /&gt;I am trying to get xml data using xpathdocument(), The xml do</title><link>https://community.appian.com/thread/25592?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2015 12:01:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:73e3c608-a3ac-4559-bb0a-7166fa86fc30</guid><dc:creator>Venu</dc:creator><description>What i need exactly is the xml contains 3 Test information, i need to save three records in CDT&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi All,&lt;br /&gt;&lt;br /&gt;I am trying to get xml data using xpathdocument(), The xml do</title><link>https://community.appian.com/thread/25569?ContentTypeID=1</link><pubDate>Tue, 15 Dec 2015 18:30:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:04b258b2-1947-42f2-90ec-12c84bfc154b</guid><dc:creator>PhilB</dc:creator><description>The namespace being attached is expected as it&amp;#39;s part of the top level XML and so is replicated on the result you extract. What exactly are you trying to extract? If you&amp;#39;re able to provide that, I might be able to tell you what expression to use.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi All,&lt;br /&gt;&lt;br /&gt;I am trying to get xml data using xpathdocument(), The xml do</title><link>https://community.appian.com/thread/25567?ContentTypeID=1</link><pubDate>Tue, 15 Dec 2015 18:12:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:50cd277f-c07f-48e5-b8cf-25a8a891f4ca</guid><dc:creator>Venu</dc:creator><description>Phil, Thanks for your reply&lt;br /&gt;&lt;br /&gt;i used the above xpath, but &amp;quot;xmlns=&amp;quot;&lt;a href="http://www.adatum.com"&gt;http://www.adatum.com&amp;quot;&lt;/a&gt; is appended to the result (to the Test element as below).&lt;br /&gt;======================&lt;br /&gt;&amp;lt;Test xmlns=&amp;quot;&lt;a href="http://www.adatum.com"&gt;http://www.adatum.com&amp;quot;&lt;/a&gt; TestId=&amp;quot;0001&amp;quot; TestType=&amp;quot;CMD&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;Name&amp;gt;Convert number to string&amp;lt;/Name&amp;gt;&lt;br /&gt;    &amp;lt;CommandLine&amp;gt;Examp1.EXE&amp;lt;/CommandLine&amp;gt;&lt;br /&gt;    &amp;lt;Input&amp;gt;1&amp;lt;/Input&amp;gt;&lt;br /&gt;    &amp;lt;Output&amp;gt;One&amp;lt;/Output&amp;gt;&lt;br /&gt;  &amp;lt;/Test&amp;gt;; &lt;br /&gt;======================&lt;br /&gt;Any suggestions.&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi All,&lt;br /&gt;&lt;br /&gt;I am trying to get xml data using xpathdocument(), The xml do</title><link>https://community.appian.com/thread/25559?ContentTypeID=1</link><pubDate>Tue, 15 Dec 2015 15:43:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e4cc41ac-7d54-4df4-a264-1ce16e2a7b21</guid><dc:creator>PhilB</dc:creator><description>If you want to get an array of each Test within the Tests element, your xpath expression needs to be /*[name()=&amp;#39;Tests&amp;#39;]/*[name()=&amp;#39;Test&amp;#39;] as this should avoid the issue caused by the namespacing.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>