XML Attributes vs. ? and Javascript

I’m trying to consolidate two XML documents that have their information written out differently. In one all the info is an “attribute”.


<marker lat="38.663036" lng="-121.277524" address="5333 Primrose Drive" city="Fair Oaks" state="California" zip="95628" desc="2 Bed/2 Bath $975" url="http://www.bluerockpm.com/Primrose%20Drive.htm" />

In the other, I’m not sure what the technical term is for it, but it looks like this:


<property>
        <img>properties/Antelope/8345 Cereus Court/thumb.jpg</img>
        <area>Antelope</area>
        <address>8345 Cereus Court</address>
        <desc>3 Bed/2.5 Bath</desc>
        <price>1575</price>
        <url>http://www.bluerockpm.com/Cereus%20Court%208345.htm</url>
    </property>

How can I change my JavaScript so that it recognizes the second XML format instead of taking the attributes. The JS looks like this right now:


 var markers = xmlDoc.documentElement.getElementsByTagName("property");

var address = markers*.getAttribute("address");

Any help would be appreciated. Thank you!