-1
<?xml version="1.0" encoding="utf-8" ?>
<ContactInfo>
  <info toll_free_phone="(800)471-9933"
        direct_phone="(210)361-9910"
        fax="(210)361-9911"
        email="support@rapidbillpay.com"
        address_line1="2018 I-10 West"
        address_line2=""
        city="San Antonio"
        state="TX"
        zip="78216"/>
</ContactInfo>

How do I Access info from such kind of XML data?

In this case, there are no separate elements for each property like

<fax>xxxxx</fax>

They the values are under single element "info"

Xuva
  • 21
  • 6
  • 2
    Possible duplicate of [Parse XML using JavaScript](https://stackoverflow.com/questions/17604071/parse-xml-using-javascript) – Nisarg Shah Sep 28 '17 at 08:40

1 Answers1

0

In this case data is represented in Attributes instead of elements.

Refer:

https://www.w3schools.com/xml/xml_tree.asp

https://www.w3schools.com/xml/xml_attributes.asp

reading XML attributes in javascript

Xuva
  • 21
  • 6