...

View Full Version : reading in xml data



crlogic808
06-23-2010, 08:16 PM
need help....
I need to create a web page that can pull data from sensatronics senturion sensor probe. The unit has a web server that displays temperature, humidity,etc. You can also query it for from telnet or webpage which kicks back xml.

My page needs to read the values of the probes. I don't know much about javascript and have been unsuccessful trying to use httprequest. I guess this would be considered cross domain as well?

Here is the XML that is generated from the unit. I get this by pulling through a web browser x.x.x.x/xmldata

Thanks

<?xml version="1.0" encoding="ISO-8859-1"?>
<Sensatronics id="S10604" hb="10554">
<Group id="1">
<Probe id="100"><Value>75.2</Value></Probe>
</Group>
<Group id="2">
</Group>
<Group id="3">
</Group>
<Group id="4">
</Group>
<Group id="5">
</Group>
<Group id="6">
</Group>
<Group id="7">
</Group>
<Group id="8">
</Group>
<Group id="9">
<Probe id="99"><Value>1.0</Value></Probe>
<Probe id="1"><Value>79.5</Value></Probe>
<Probe id="2"><Value>34.3</Value></Probe>
<Probe id="3"><Value>35.6</Value></Probe>
<Probe id="4"><Value>0.0</Value></Probe>
</Group>
</Sensatronics>

Old Pedant
06-24-2010, 12:31 AM
have been unsuccessful trying to use httprequest. I guess this would be considered cross domain as well?

Yes. So you can't do it in the browser. You will need to do this via server side code (PHP, ASP, JSP, etc.).

If there is some reason you *need* to do this in the browser, you could perhaps set up a simple proxy on your server that would "forward" the data from the foreign URL to your own.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum