Suppose I have an XML object in the following format:
<book id="01">
<author>Conner, Jim</author>
<title>House Hunter</title>
<genre>DIY</genre>
<price>5.95</price>
<publish_date>2000-12-16</publish_date>
<description>A former architect describes his theories
on finding best value homes.</description>
</book>
To retrieve the author property, I can use this code:
request.responseXML.getElementsByTagName('book')[0].firstChild.nextSibling
For the title property, I can use:
request.responseXML.getElementsByTagName('book')[0].firstChild.nextSibling.nextSibling.nextSibling
Is there a more efficient way to access this data using vanilla JavaScript, rather than JQuery?