julien_c
julien_c

Reputation: 5092

Transform a DOMDocument into a DOMNode

I might be missing something obvious, but how do you turn a DOMDocument into a DOMNode, in PHP?

Upvotes: 1

Views: 66

Answers (1)

Fabian Schmengler
Fabian Schmengler

Reputation: 24551

A DOMDocument already is a DOMNode (see documentation):

 DOMDocument extends DOMNode

It represents the root node as well as the document itself.

Upvotes: 1

Related Questions