Using XPath to parse an XML array
When working with static data produced from older, or closed systems (where it is not possible to interrogate for data using web APIs or dynamic queries), one common language is eXtensible Markup Language (XML). Originally intended to be an extension to HTML tags, it became a language on its own merits. For many years (and it is still used now), it was the leading universal language for transferring data between two systems. Early web messages were sent as an XML message block. This is a string of text that forms the object (the record in database terms) and the object could refer to different aspects of data.
For example, our contact in the supplying system may have basic personal details such as their title, date of birth, nationality, and the relationship the company has with this person (for example, are they a customer?):
- Attached to that data could also be an array of addresses the contact has lived at within the past 10 years. ...