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.
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
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
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 =
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,
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
*
*/