Re: [OpenLayers-Users] XML Parsing via OpenLayers?

2008-10-10 Thread Tim Schaub
Hey- Maps-R-us wrote: Thanks Bart, I will give that a try. Openlayers sure requires a lot more code than the Google Maps API XML parser! This is not going to make it look any easier, but if you want inspiration, you could see the XML format tests for some parsing of arbitrary XML.

[OpenLayers-Users] XML Parsing via OpenLayers?

2008-10-07 Thread Maps-R-us
Hi there, I would like to retrieve elements in an xml file based on tag name and populate an array. Here is a sample of the XML: users user fullnameTest/fullname ID3400/ID lat0.003926753994724706/lat lon0.00446319580078125/lon

Re: [OpenLayers-Users] XML Parsing via OpenLayers?

2008-10-07 Thread Bart van den Eijnden (OSGIS)
You need to parse the XML in the loadSuccess function, check examples/GMLParser.html for an example. Best regards, Bart Maps-R-us wrote: Hi there, I would like to retrieve elements in an xml file based on tag name and populate an array. Here is a sample of the XML: users user

Re: [OpenLayers-Users] XML Parsing via OpenLayers?

2008-10-07 Thread Maps-R-us
Thank you Bart, I actually do this in my loadSuccess function: function loadSuccess(request) { updateStatus(loaded); if(!request.responseXML.documentElement) { doc = format.read(request.responseText); } else { doc =

Re: [OpenLayers-Users] XML Parsing via OpenLayers?

2008-10-07 Thread Bart van den Eijnden (OSGIS)
Maybe you can try and create your own Format class, something like: /** * @requires OpenLayers/Format/XML.js * */ OpenLayers.Format.MyFormat = OpenLayers.Class( OpenLayers.Format.XML, { initialize: function(options) { OpenLayers.Format.XML.prototype.initialize.apply(this,

Re: [OpenLayers-Users] XML Parsing via OpenLayers?

2008-10-07 Thread Maps-R-us
Thanks Bart, I will give that a try. Openlayers sure requires a lot more code than the Google Maps API XML parser! Cheers, Mark Bart van den Eijnden wrote: Maybe you can try and create your own Format class, something like: /** * @requires OpenLayers/Format/XML.js * */