Die XML-Deklaration

Die optionalen XML-Deklarationen informieren über die Version und das Encoding und zudem über externe Auszeichnungsdeklarationen.

Produktionsregeln

[23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
[24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')
[25] Eq ::= S? '=' S?
[26] VersionNum ::= '1.0' 1.0

[26] VersionNum ::= '1.1' 1.1

[32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'")
 | ('"' ('yes' | 'no') '"'))
[80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" )
[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* /*
 Encoding name contains only Latin characters */

Beispiele

<?xml version="1.0" ?> <?xml version="1.1" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="UTF-8" ...

Get XML: kurz & gut now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.