treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Reading XML file with Javascript

  • I have an xml file that is structured like so.

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <MapPoints>
    <MapPoint PointID="1">
    <LocationName></LocationName>
    <LocationAddress></LocationAddress>
    <LocationURL></LocationURL>
    <LocationExt></LocationExt>
    <LocationFax></LocationFax>
    <LocationLat></LocationLat>
    <LocationLong></LocationLong>
    <LocationMarker></LocationMarker>
    </MapPoint>
    <MapPoint PointID="2">
    <LocationName></LocationName>
    <LocationAddress></LocationAddress>
    <LocationURL></LocationURL>
    <LocationExt></LocationExt>
    <LocationFax></LocationFax>
    <LocationLat></LocationLat>
    <LocationLong></LocationLong>
    <LocationMarker></LocationMarker>
    </MapPoint>
    </MapPoints>


    This XML file will contain multiple 's. I'm not very familiar with using javascript to read an xml file and use the data as needed.

    I'm wanting to populate a Google Map using XML and JS.