Usually XML document starts with the header like <?xml version="1.0" encoding="utf-8"?>
Consider this document
<?xml version="1.0" encoding="utf-8"?>
<Foo>
<?One?>
<?Two some?>
<?Three <?Nested ?> ?>
</Foo>
- Can one reuse
<?and?>again inside the XML document? - Does XML parser ignore these content in these tags? How to get them?
- Is there any problem with Three’s Nested tag?
My guess is these are document property and can be placed anywhere. Right? Also I’m thinking to do some XML data generation based on these meta tags. Is that a right approach?
e.g.
<?if a == b ?>
<Node>IncludeIfEqual</Node>
<?endif ?>
PS Google doesn’t help. It ignores <? keyword.
The question marks indicate that the command is an XML processing instruction. This allows a document to contain instructions for applications.
See here: Processing Instructions
Also another interesting little page on them:
XMLPLEASE