I have an image generated with PHP that contains dynamically generated text. The data it was originally sourcing from has changed to a different format, from JSON to XML. I'm unfamiliar with XML and related PHP commands.
What I wish to do is to echo a specific part of the XML page/file. For example, if the data is structured in this manner:
<sometag>
<anothertag>
<tag1>ABC123</tag1>
<tag2>DEF456</tag2>
<tag3>GHI789</tag3>
</anothertag>
</sometag>
If I want to echo the contents of, say, tag2, what would I need to do? Is there some sort of $xml->tag2 feature, similar to how it works with JSON?