I'm looking to find a specific attribute of a specific element in an HTML document using PHP DOMDocument.
Specifically, there is a div with a unique class set, and only a single span inside of it. I need to retrieve the style attribute of that span element.
Example:
<div class="uniqueClass"><span style="text-align: center;" /></div>
For this example, with the uniqueClass being the only instance of that class in the document, I would need to retrieve the string:
text-align: center;
You have to use DOMXPAth class