Can an XML prolog contain custom information?
Posted
by
DaveJohnston
on Stack Overflow
See other posts from Stack Overflow
or by DaveJohnston
Published on 2012-10-15T15:53:22Z
Indexed on
2012/10/15
21:37 UTC
Read the original article
Hit count: 207
Xml
Is it legal to add additional custom information somewhere in an XML prolog? For example, in my case, I would like to add an indicator of which serialiser version was used to create the XML, so that clients receiving the XML could automatically select the correct corresponding de-serialiser.
I could add the information as an attribute of the root tag, but I thought it would be cleaner to add the information in the prolog, like the standard XML version:
<?xml version="1.0"?>
something like:
<?serialiser version="1.0"?>
or is the prolog reserved purely for those things specified by W3C?
© Stack Overflow or respective owner