TL;DR: See title
Details:
I'm currently querying an XML API that's a little quirky.
Sometimes when you make a request, you get back an XML file of the data requested. Other times, you get back an XML file with a message that says your request has been queued.
I've thought about using xpath queries to see if the data I'm expecting is there before continuing on, but it's entirely possible that a valid, properly served query will result in an empty set so this will sometimes yield a false negative.
One saving grace is that the server will return a different HTTP status code when it is queueing the request. However, I don't know how to inspect the result of xml_read
to tell what the code is and the documentation does not seem to provide any guidance.