<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Web Service XML with node attributes generates ERROR]]></title><description><![CDATA[<p dir="auto">Hello.</p>
<p dir="auto">I'm trying to collect data from a web service. The xml data has this format:</p>
<p dir="auto">&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;Result&gt;<br />
&lt;UserStatus Status="2" StatusFrom="230904080005" ClientType="13,16" Device="tel:0123456789" TerminalCapabilities="1" DeviceStatusFrom="231204092543" OfficeDeviceStatusFrom="230918121327" MobileDeviceStatusFrom="231204092543" ServerTime="231204155632" DisplayName="Full Name"&gt;<a href="mailto:mailaddress@example.com" rel="nofollow ugc">mailaddress@example.com</a>&lt;/UserStatus&gt;<br />
&lt;/Result&gt;</p>
<p dir="auto">When using DCI parameter WebService1:/Result/UserStatus, I get <a href="mailto:mailaddress@example.com" rel="nofollow ugc">mailaddress@example.com</a> returned.<br />
When trying to collect the value of an attribute, for example WebService1:/Result/UserStatus/Status, I get &lt;&lt;ERROR&gt;&gt; instead of the value 2.</p>
<p dir="auto">Is the XML parser in NetXMS compliant with the XML standard?<br />
When testing on <a href="http://xmlvalidation.com" rel="nofollow ugc">xmlvalidation.com</a> it says No errors were found, and this PowerShell oneliner demonstrates it should work:</p>
<p dir="auto">([xml]'&lt;Result&gt;&lt;UserStatus Status="2"/&gt;&lt;/Result&gt;').Result.UserStatus.Status</p>
<p dir="auto">Thanks in advance.</p>
]]></description><link>https://forum.netxms.org/topic/7834/web-service-xml-with-node-attributes-generates-error</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:45:08 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7834.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 04 Dec 2023 15:45:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Web Service XML with node attributes generates ERROR on Thu, 22 Feb 2024 14:09:04 GMT]]></title><description><![CDATA[<p dir="auto">We upgraded to 4.5.3 today and had a new look on my Web Services. XPath is working perfectly. Thank you!</p>
]]></description><link>https://forum.netxms.org/post/33238</link><guid isPermaLink="true">https://forum.netxms.org/post/33238</guid><dc:creator><![CDATA[mashedpotatorocket]]></dc:creator><pubDate>Thu, 22 Feb 2024 14:09:04 GMT</pubDate></item><item><title><![CDATA[Reply to Web Service XML with node attributes generates ERROR on Fri, 19 Jan 2024 10:16:46 GMT]]></title><description><![CDATA[<p dir="auto">XPath was added in 4.5.0, so you can try using this.</p>
]]></description><link>https://forum.netxms.org/post/33133</link><guid isPermaLink="true">https://forum.netxms.org/post/33133</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Fri, 19 Jan 2024 10:16:46 GMT</pubDate></item><item><title><![CDATA[Reply to Web Service XML with node attributes generates ERROR on Fri, 08 Dec 2023 11:43:05 GMT]]></title><description><![CDATA[<p dir="auto">current xml parsing code does not support this. In the future we will consider adding xms parsing library (same as we now have jq to parse json format). You can follow this ticket: <a href="https://track.radensolutions.com/issue/NX-2485" rel="nofollow ugc">https://track.radensolutions.com/issue/NX-2485</a></p>
<p dir="auto">Currently you can enable "Process response as plain text" in properties of the web service and use a regex instead of path to get the value</p>
]]></description><link>https://forum.netxms.org/post/33063</link><guid isPermaLink="true">https://forum.netxms.org/post/33063</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Fri, 08 Dec 2023 11:43:05 GMT</pubDate></item></channel></rss>