When you write enough code that communicates with third-party APIs, you’re more than likely going to find yourself communicating with an XML-based API.
And say what you will about it: Some like it, some don’t. But they exist, and they are thus going to be a necessary part of your development at some point.
If the API is well-designed, it will likely use namespaces for different types of requests and responses. And when you’re writing the client for said API, then you’re likely going to need to go about retrieving namespaced properties.
It’s easy to do it, but it’s not immediately obvious. So in this post, I’m going to walk through an example of how to do just that.