XML DOM - XML DOM DocumentType Object - DOM DocumentType Object Attribute publicId - XML DOM

Explain the publicId attribute of the DocumentType Object method

The public identifier of the external subset is returned by the publicId attribute of the DocumentType object method.

Syntax

The syntax for the publicId attribute is as follows:

Example

The contents of notation.xml are as follows:

The illustration below displays the publicId attribute usage.

Execution

The file is saved as documenttype_publicid.html on the server path and this file should be on the same path as that of node.xml in the server. The output appears as follows:

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

XML DOM Topics