I know XML documents usually start with something like:
<?xml version="1.0" encoding="UTF-8"?>
My question is regarding the <? and ?> what do they mean on their own?
As in what does:
<?Any old text?>
mean in XML
Thanks
I know XML documents usually start with something like:
<?xml version="1.0" encoding="UTF-8"?>
My question is regarding the <? and ?> what do they mean on their own?
As in what does:
<?Any old text?>
mean in XML
Thanks
The <? sequence starts a so-called processing instruction. These are bits added for third-party software to process. Famously, <?php is technically a PI, but also things like XSLT stylesheet embedding:
<?xml-stylesheet href="classic.xsl" type="text/xml"?>
It's a prolog – see 'The XML Prolog' in XML Syntax Rules at w3schools.com.
For more thorough definition see '2.8 Prolog and Document Type Declaration' in 'Extensible Markup Language (XML)' at W3C.