List the rules to be followed by an XML document.Following rules need to be followed by an XML document:
- They must have a root tag, the document should be well formed : The tags should be properly closed, since XML is case sensitive, one should take care that the documents are written with proper care and the attribute values should be inside “”.Explain about XML Canonicalization.- Canonicalization refers to finding the simplified form of an XML document. - XML files may not contain the same sequence of characters (bytes or octets) even if they are logically equivalent. This is where we need to canonicalize them and check their canonical forms.
Steps to canonicalize an XML document
1. Encoding schemes should represent characters by octets.XML documents should be encoded in UTF-8 encoding. 2. The canonical form needs all line breaks to be #xA. 3. All attributes need to be normalized in canonical form.
|