20
I had a discussion with a colleague of mine about the XML declaration node (I'm talking about this => <?xml version="1.0" encoding="UTF-8"?>).
I believe that for something to be called "valid XML", it requires a XML declaration node.
My colleague states that the XML declaration node is optionnal, since the default encoding is UTF-8 and the version is always 1.0. This make sense, but what does the standard says ?
In short, given the following file:
<books>
<book id="1"><title>Title</title></book>
</book>
Can we say that:
- It is valid XML ?
- It is a valid XML node ?
- It is a valid XML document ?
Thank you very much.