What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

XML question, values in tags.

Votes:

0

Consider the following XML

<ServerStatus>
<ServerStatusHash>3809a723-038f-4129-b597-06ef0c244452</ServerStatusHash>
<Server Name="Diafaan SMS Server - full edition">...</Server>
<GatewayStatusList>
<Gateway Name="GSM Modem Gateway" Id="1" Active="1" SendEnabled="1" ReceiveEnabled="1">
<Status>Ready to send and receive messages</Status>

The Gateway Name tag above is what's giving me grief. I'm trying to read the

<Status>Ready to send and receive messages</Status>

tag below but I always get errors.

The Status tag is not unique so I cant just reference that tag.

Using the example section1/value_float does not work as it doesn't seem to like tags with values in them.

http-xml xml xml-rest-value

Created on Feb 18, 2015 8:38:08 AM

Last change on Feb 18, 2015 8:51:31 AM by  Torsten Lindner [Paessler Support]



1 Reply

Votes:

0

Can you post the full XML? Because the XML you posted is not valid (Gateway node opened, but not closed). Let's assume the XML looks like this:

<ServerStatus>
	<ServerStatusHash>3809a723-038f-4129-b597-06ef0c244452</ServerStatusHash>
	<Server Name="Diafaan SMS Server - full edition">...</Server>
	<GatewayStatusList>
		<Gateway Name="GSM Modem Gateway" Id="1" Active="1" SendEnabled="1" ReceiveEnabled="1">
			<Status>Ready to send and receive messages</Status>
		</Gateway>
	</GatewayStatusList>
</ServerStatus>

The XPath should look like this: ServerStatus/GatewayStatusList/Gateway[1]/Status ...in order to get the status content of the first entry. Is that what you need?

Created on Feb 18, 2015 10:15:13 AM by  Stephan Linke [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.