These are the various messages, given during importing an external document. They all mean that the document is not well-formed.
- "Doctype declaration not valid at line line_no, position position_no !"
This error is given when there is a DTD in the file, containing the document and the DTD can not be parsed successfully.
- "Invalid character at line line_no, position position_no !"
This is given when there are characters other than white space characters at the beginning of the document.
Example:Asdfg <books>…..</books>
- "No document or wrong char encoding!"
This is given on a blank document file or when the character encoding is not recognized. Character encoding is set when the user is asked to point out to a file containing the document.
- "CDATA section not closed at line line_no, position position_no !"
This is given when a CDATA element misses its closing declaration - ‘]]>’.
Example:<book><![CDATA[ Alice in wonderland</book>
- "Processing Instruction at line line_no, position position_no not closed!"
This is given when a Processing Instruction is opened but not closed. The missing end is '?>'. Processing instructions are parsed, but not processed further.
- "Comment at line line_no, position position_no not closed!"
This is given when a comment is opened but not closed. The missing end is '-->'. Comments are parsed, but not processed further.
- "Invalid element at line line_no, position position_no - <> !"
This is given when the parser finds an opening tag without a name, that is, the sequence ‘<>’.
- "Invalid element at line line_no, position position_no - </> !"
This is given when the parser finds a closing tag without a name, that is, the sequence ‘</>’.
- "Element not closed at line line_no, position position_no !"
This is given when an opening or closing tag is not properly closed.
Example:<book author = "Luis Carol>… (missing closing ")
<book (end of document)
- "Invalid attribute at line line_no, position position_no !"
This is given when an attribute is not given a value.
Example:<book author>
- "Attribute value not closed at line line_no, position position_no !"
This is given when an attribute value is not closed.
Example:<book author = ”Luis Carol>
- "Attribute declaration must be in the opening tag at line line_no, position position_no !"
This is given when the parser finds attribute declarations in the closing tag of an element.
Example:<book>Alice in Wonderland</book author = ”Luis Carol”>
- "Invalid nesting of opening and closing tags at line line_no, position position_no.
Expected <element> opened at line line_no, position position_no ."This is given when the parser finds an element that is closed before all of its children are closed.
Example:<books><book> Alice in Wonderland </books>
- "Attribute <attr_name> already declared at line line_no, position position_no !"
Is is given when an attribute is declared more than once for the same element.
Example:<book author = ”Luis” author = ”Carol”>
- "Text not closed at line line_no, position position_no !"
Is is given when the documents end with a text.
Example:<book>Alice in Wonderland (end of document)
- "Document not finished!"
It is given when the document element is not closed.
Example:<books><book> Alice in Wonderland </book> (end of document)