XML documents may be built from multiple parsed entities, each of which is not necessarily a well-formed XML document, but is at least a plausible part of a well-formed XML document.
Each entity may have its own text declaration.
This is like an XML declaration without a standalone
attribute
and with an optional version
attribute:
<?xml version="1.0"?>
<?xml version="1.0" encoding="ISO-8859-9"?>
<?xml encoding="ISO-8859-9"?>
DOM3 adds three read-only properties:
Java binding:
package org.w3c.dom;
public interface Entity extends Node {
public String getInputEncoding();
public String getXmlEncoding();
public String getXmlVersion();
}