Is there a way to retrieve the raw tag source for a DOMElement
instance? I've gotten a list of nodes matching an XPath query using DOMXpath::query()
, and then have accessed a single DOMElement
with DOMNodeList::item($i)
. Essentially I want to get the tag source for DOMElement
as a string like:
<tag attr1="whatever" attr2="somethingElse" />