Easy Tutorial
❮ Dom Prop Node Namespaceuri Met Comment Substringdata ❯

XML DOM ownerDocument Property



Definition and Usage

The ownerDocument property returns the document object to which the selected element belongs.

Syntax


Example

The following code snippet uses loadXMLDoc() to load "books.xml" into xmlDoc and retrieves the name and node type from the owner document of the first <title> element:

Example

The above code will output:


❮ Dom Prop Node Namespaceuri Met Comment Substringdata ❯