the most awesome guy ever.

The Blog of Darryl E. Clarke

  Random musings from a jaded coder who just needs a hug.

Posts Tagged ‘javascript’

Why is XML Such a Pain in JavaScript?

Saturday, February 7th, 2009

Why is it that when one tries to parse some fairly simple xml:

<placemarks>
	<placemark>
		<name>Placemark 1</name>
		<latitude>-79.00</latitude>
		<longiude>42.00</longitude>
	</placemark>
	<placemark>
		<name>Placemark 2</name>
		<latitude>-129.00</latitude>
		<longiude>43.00</longitude>
	</placemark>
</placemarks>

For example, iterating through all the placemarks and extracting the names, lats and longs using javascript is a very tedious affair. In fact, I’ve found it almost pointless to even try without my head exploding.

(more…)

Tags: , , ,
Posted in Coding, PHP, Zend Framework