Partager via


XML declaration

Applies To: Windows Server 2008

All ADMX files may start with the XML declaration. The XML declaration is not considered to be part of the ADMX document. However, it is good practice to start the ADMX file with the XML declaration to specify that this is an XML document.

Syntax

<?xml version="<placeholder for version number>" encoding="<placeholder for character encoding"?>

Where:

Attributes

Attributes Required Description

version

Yes

version="<placeholder for version number>"

The version of XML used in the document. Currently, the only version of XML available is 1.0.

encoding

No

encoding="<placeholder for character encoding"

Character encoding information used by XML parsers. ADMX files are always UTF-8 encoded.

Note

The Group Policy tools will successfully consume the ADMX file that does not include the XML declaration. The ADMX file may not validate as a fully-formed XML file if the XML declaration is not included in the .admx file.

Child elements

There are no child elements associated with this element.

Remarks

At a minimum, the XML declaration must specify the XML version attribute. The XML declaration may also contain the document encoding attribute. Both attributes are set at the start of each file through one declaration. The declaration begins with the notation, '<?', and ends with the notation, '>?'. The declaration must not be preceded by comments, white space or other XML processing instructions.

Examples

The XML fragment is an example of an XML declaration that includes the version and character encoding attributes.

<?xml version="1.0" encoding="utf-8"?>

Additional references

ADMX syntax