This is probably a relatively simple problem but I am finding it difficult to be able to parse my specific xml object in javascript.
My XML looks like this
<ns2:GetItemResponse xmlns:ns2="urn:ebay:apis:eBLBaseComponents">
<Ack>Success</Ack>
<Build>E1125_INTL_API_19070421_R1</Build>
<Item>
<AutoPay>false</AutoPay>
<BuyItNowPrice>0.0</BuyItNowPrice>
<BuyerProtection>ItemIneligible</BuyerProtection>
<Charity>
<CharityID>1135</CharityID>
<CharityName>The Humane Society of the United States</CharityName>
<CharityNumber>1726</CharityNumber>
<DonationPercent>10.0</DonationPercent>
<LogoURL>https://i.ebayimg.com/00/s/NzYyWDEzNzM=/z/K3EAAOSwFgNdVeRz/$_1.JPG?set_id=8800005007
</LogoURL>
<Mission>
The Humane Society of the United States is the nation's most effective animal protection organization. Since 1954, HSUS has been fighting for the protection of all animals through advocacy, education and hands-on programs. Together with our affiliates, we rescue and care for tens of thousands of animals each year, but our primary mission is to prevent cruelty before it occurs. We're there for all animals!
</Mission>
<Status>Valid</Status>
</Charity>
<Country>US</Country>
<Description>
<p dir="ltr">Wolverine #100 - April 1996 Marvel Comics The 100th Issue! Comic Book. </p>
</Description>
</Item>
<Timestamp>2020-02-13T14:19:33.939Z</Timestamp>
<Version>1125</Version>
</ns2:GetItemResponse>
I basically want to display the Item properties and Charity properties but I am finding it difficult to understand the child nodes of these objects I have tried doing this
parser = new DOMParser();
var obj = request.responseXML;
console.log(obj.getElementsByTagName("Item")[0]);
xmlDoc = parser.parseFromString(request.responseText, "text/xml");
// panel.innerHTML += "<br> " + xmlDoc.getElementsByTagName("ItemId")[0].childNodes[0].nodeValue ;
//console.log(xmlDoc.getElementsByTagName("Timestamp")[0].childNodes[0].nodeValue);
console.log(xmlDoc.getElementsByTagName("Item")[0].childNodes);
All help would be greatly appreciated