I am looking at trying to use some dependent items that parse an xml value.
I have setup an item to query a web service and return an XML string:
<RestAPIStatusModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RestAPI.Models"><Id>a5d9cfa3-b68c-4799-8166-9df39016abb4</Id><IsHealthy>true</IsHealthy><JobIsRunning>false</JobIsRunning><NotHealthyError></NotHealthyError><Printers><RestAPIPrinterModel><Is Available>true</IsAvailable><Message></Message><Name>10.10.224.17</Name><Status>Idle</Status></RestAPIPrinterModel></Printers><ServicesStatus><RestAPIServiceStatusMode l><IsAvailable>true</IsAvailable><Message>Service is Available</Message><ServiceName>BatchSpooler</ServiceName><ServiceType>BatchSpooler</ServiceType></RestAPIServiceStatusModel><RestAPIServiceStatusMod el><IsAvailable>true</IsAvailable><Message></Message><ServiceName>net.pipe://127.0.0.1/RenderingEngineService</ServiceName><ServiceType>Renderer</ServiceType></RestAPIServiceStatusModel><RestAPIServiceStatusMod el><IsAvailable>true</IsAvailable><Message></Message><ServiceName>PrintSpooler1</ServiceName><ServiceType>PrintSpooler</ServiceType></RestAPIServiceStatusModel></ServicesStatus></RestAPIStatusModel>
Next I wanted to parse out the values of IsHeathy, NotHeathlyError, and IsAvailable.
For the IsHealthy I am using the preprocessing XML XPath of string(/IsHealthy) but I am getting a null string.
Anyone have an idea where my error is?
I have setup an item to query a web service and return an XML string:
<RestAPIStatusModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RestAPI.Models"><Id>a5d9cfa3-b68c-4799-8166-9df39016abb4</Id><IsHealthy>true</IsHealthy><JobIsRunning>false</JobIsRunning><NotHealthyError></NotHealthyError><Printers><RestAPIPrinterModel><Is Available>true</IsAvailable><Message></Message><Name>10.10.224.17</Name><Status>Idle</Status></RestAPIPrinterModel></Printers><ServicesStatus><RestAPIServiceStatusMode l><IsAvailable>true</IsAvailable><Message>Service is Available</Message><ServiceName>BatchSpooler</ServiceName><ServiceType>BatchSpooler</ServiceType></RestAPIServiceStatusModel><RestAPIServiceStatusMod el><IsAvailable>true</IsAvailable><Message></Message><ServiceName>net.pipe://127.0.0.1/RenderingEngineService</ServiceName><ServiceType>Renderer</ServiceType></RestAPIServiceStatusModel><RestAPIServiceStatusMod el><IsAvailable>true</IsAvailable><Message></Message><ServiceName>PrintSpooler1</ServiceName><ServiceType>PrintSpooler</ServiceType></RestAPIServiceStatusModel></ServicesStatus></RestAPIStatusModel>
Next I wanted to parse out the values of IsHeathy, NotHeathlyError, and IsAvailable.
For the IsHealthy I am using the preprocessing XML XPath of string(/IsHealthy) but I am getting a null string.
Anyone have an idea where my error is?
Comment