To better explain:
I am reading from a json file, a snippet like this:
Json:
Code:
"html": "<section xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:epub=\"http://www.idpf.org/2007/ops\" epub:type=\"cover\">"
The value for 'html' varies, so the element is not always 'section'.
Now, on the main script, I want to check if the html snippet has an 'epub:type' attribute. If it does, I want to save it to the 'epub_type' variable.