I'm looking to parse an XML file into a reader. The example below I have used and works a treat with attributes. I'm looking to use Elements and I am unsure what to change in the code to make it work. the get Attribute option appears the most logical to change however as my elements are different I'm unsure what to change in the getElementsByTagName. I assume I duplicate this?
I have used this example (read external XML files in Android ) of how to read and parse an XML file which works fine.
<Survey>
<Job>
<JobNo>123456</JobNo>
<JobType>1</JobType>
<Customer>AutoAppliance</Customer>
<Contact>Barry Scott</Contact>
<Salutation>Mr</Salutation>
<FirstName>Keith</FirstName>
<SurName>Hawkins</SurName>
<CompanyName></CompanyName>
<Address1>10 St. Thomas Court</Address1>
<Address2>Wimbledon</Address2>
<Address3></Address3>
<TownCity>LONDON</TownCity>
<County></County>
<Postcode>E1 1EE</Postcode>
<Phone1>0800 000 000</Phone1>
<Phone2>01222 222 111</Phone2>
<Email1>anotheremail@googlemail.com</Email1>
<Email2></Email2>
</Job>
<Job>
<JobNo>789012</JobNo>
<JobType>2</JobType>
<Customer>Bristol</Customer>
<Contact>Paul Pogba</Contact>
<Salutation>Mrs</Salutation>
<FirstName>Belinda</FirstName>
<SurName>Carlisle</SurName>
<CompanyName></CompanyName>
<Address1>34 Test Lane</Address1>
<Address2></Address2>
<Address3></Address3>
<TownCity>Anytown</TownCity>
<County>West Sussex</County>
<Postcode>BN1 0TT</Postcode>
<Phone1>01903 333 444</Phone1>
<Phone2>07900 777 777</Phone2>
<Email1>mytestemail@icloud.com</Email1>
<Email2></Email2>
</Job>