Microsoft XML 2.5 SDK


 

IXMLParseError Error Messages

[This is preliminary documentation and subject to change.]

The following errors are obtained from the IXMLDOMParseError object's errorCode property, which is specifically for parse errors.

Parse Errors

MSG_E_FORMATINDEX_BADINDEX The value passed in to formatIndex needs to be greater than 0.
MSG_E_FORMATINDEX_BADFORMAT Invalid format string.
MSG_E_SYSTEM_ERROR System error: %1.
MSG_E_MISSINGEQUALS Missing equals sign between attribute and attribute value.
MSG_E_EXPECTED_TOKEN Expected token %1 found %2.
MSG_E_UNEXPECTED_TOKEN Unexpected token %1.
MSG_E_MISSINGQUOTE A string literal was expected, but no opening quote character was found.
MSG_E_COMMENTSYNTAX Incorrect syntax was used in a comment.
MSG_E_BADSTARTNAMECHAR A name was started with an invalid character.
MSG_E_BADNAMECHAR A name contained an invalid character.
MSG_E_BADCHARINSTRING The character '<' cannot be used in an attribute value.
MSG_E_XMLDECLSYNTAX Invalid syntax for an xml declaration.
MSG_E_BADCHARDATA An Invalid character was found in text content.
MSG_E_MISSINGWHITESPACE Required white space was missing.
MSG_E_EXPECTINGTAGEND The character '>' was expected.
MSG_E_BADCHARINDTD Invalid character found in DTD.
MSG_E_BADCHARINDECL An invalid character was found inside a DTD declaration.
MSG_E_MISSINGSEMICOLON A semi colon character was expected.
MSG_E_BADCHARINENTREF An invalid character was found inside an entity reference.
MSG_E_UNBALANCEDPAREN Unbalanced parentheses.
MSG_E_EXPECTINGOPENBRACKET An opening '[' character was expected.
MSG_E_BADENDCONDSECT Invalid syntax in a conditional section.
MSG_E_INTERNALERROR Internal error.
MSG_E_UNEXPECTED_WHITESPACE Whitespace is not allowed at this location.
MSG_E_INCOMPLETE_ENCODING End of file reached in invalid state for current encoding.
MSG_E_BADCHARINMIXEDMODEL Mixed content model cannot contain this character.
MSG_E_MISSING_STAR Mixed content model must be defined as zero or more('*').
MSG_E_BADCHARINMODEL Invalid character in content model.
MSG_E_MISSING_PAREN Missing parenthesis.
MSG_E_BADCHARINENUMERATION Invalid character found in ATTLIST enumeration.
MSG_E_PIDECLSYNTAX Invalid syntax in PI declaration.
MSG_E_EXPECTINGCLOSEQUOTE A single or double closing quote character (\' or \") is missing.
MSG_E_MULTIPLE_COLONS Multiple colons are not allowed in a name.
MSG_E_INVALID_DECIMAL Invalid character for decimal digit.
MSG_E_INVALID_HEXIDECIMAL Invalid character for hexidecimal digit.
MSG_E_INVALID_UNICODE Invalid unicode character value for this platform.
MSG_E_WHITESPACEORQUESTIONMARK Expecting whitespace or '?'.
MSG_E_SUSPENDED The parser is suspended.
MSG_E_STOPPED The parser is stopped.
MSG_E_UNEXPECTEDENDTAG End tag was not expected at this location.
MSG_E_UNCLOSEDTAG The following tags were not closed: %1.
MSG_E_DUPLICATEATTRIBUTE Duplicate attribute.
MSG_E_MULTIPLEROOTS Only one top-level element is allowed in an XML document.
MSG_E_INVALIDATROOTLEVEL Invalid at the top level of the document.
MSG_E_BADXMLDECL Invalid xml declaration.
MSG_E_MISSINGROOT XML document must have a top level element.
MSG_E_UNEXPECTEDEOF Unexpected end of file.
MSG_E_BADPEREFINSUBSET Parameter entities cannot be used inside markup declarations in an internal subset.
MSG_E_PE_NESTING The replacement text for a parameter entity must be properly nested with parenthesized groups.
MSG_E_INVALID_CDATACLOSINGTAG The literal string ']]>' is not allowed in element content.
MSG_E_UNCLOSEDPI Processing instruction was not closed.
MSG_E_UNCLOSEDSTARTTAG Element was not closed.
MSG_E_UNCLOSEDENDTAG End element was missing the character '>'.
MSG_E_UNCLOSEDSTRING A string literal was not closed.
MSG_E_UNCLOSEDCOMMENT A comment was not closed.
MSG_E_UNCLOSEDDECL A declaration was not closed.
MSG_E_UNCLOSEDMARKUPDECL A markup declaration was not closed.
MSG_E_UNCLOSEDCDATA A CDATA section was not closed.
MSG_E_BADDECLNAME Declaration has an invalid name.
MSG_E_BADEXTERNALID External ID is invalid.
MSG_E_BADELEMENTINDTD An XML element is not allowed inside a DTD.
MSG_E_RESERVEDNAMESPACE The namespace prefix is not allowed to start with the reserved string "xml".
MSG_E_EXPECTING_VERSION The 'version' attribute is required at this location.
MSG_E_EXPECTING_ENCODING The 'encoding' attribute is required at this location.
MSG_E_EXPECTING_NAME At least one name is required at this location.
MSG_E_UNEXPECTED_ATTRIBUTE The specified attribute was not expected at this location. The attribute may be case sensitive.
MSG_E_ENDTAGMISMATCH End tag '%2' does not match the start tag '%1'.
MSG_E_INVALIDENCODING System does not support the specified encoding.
MSG_E_INVALIDSWITCH Switch from current encoding to specified encoding not supported.
MSG_E_EXPECTING_NDATA NDATA keyword is missing.
MSG_E_INVALID_MODEL Content model is invalid.
MSG_E_INVALID_TYPE Invalid type defined in ATTLIST.
MSG_E_INVALIDXMLSPACE XML space attribute has invalid value. Must specify 'default' or 'preserve'.
MSG_E_MULTI_ATTR_VALUE Multiple names found in attribute value when only one was expected.
MSG_E_INVALID_PRESENCE Invalid ATTDEF declaration. Expected #REQUIRED, #IMPLIED or #FIXED.
MSG_E_BADXMLCASE The name 'xml' is reserved and must be lower case.
MSG_E_CONDSECTINSUBSET Conditional sections are not allowed in an internal subset.
MSG_E_CDATAINVALID CDATA is not allowed in a DTD.
MSG_E_INVALID_STANDALONE The standalone attribute must have the value 'yes' or 'no'.
MSG_E_UNEXPECTED_STANDALONE The standalone attribute cannot be used in external entities.
MSG_E_DOCTYPE_IN_DTD Cannot have a DOCTYPE declaration in a DTD.
MSG_E_MISSING_ENTITY Reference to undefined entity.
MSG_E_ENTITYREF_INNAME Entity reference is resolved to an invalid name character.
MSG_E_DOCTYPE_OUTSIDE_PROLOG Cannot have a DOCTYPE declaration outside of a prolog.
MSG_E_INVALID_VERSION Invalid version number.
MSG_E_DTDELEMENT_OUTSIDE_DTD Cannot have a DTD declaration outside of a DTD.
MSG_E_DUPLICATEDOCTYPE Cannot have multiple DOCTYPE declarations.
MSG_E_RESOURCE Error processing resource '%1'.
XML_IOERROR Error opening input file: '%1'.
XML_ENTITY_UNDEFINED Reference to undefined entity '%1'.
XML_INFINITE_ENTITY_LOOP Entity '%1' contains an infinite entity reference loop.
XML_NDATA_INVALID_PE Cannot use the NDATA keyword in a parameter entity declaration.
XML_REQUIRED_NDATA Cannot use a general parsed entity '%1' as the value for attribute '%2'.
XML_NDATA_INVALID_REF Cannot use unparsed entity '%1' in an entity reference.
XML_EXTENT_IN_ATTR Cannot reference an external general parsed entity '%1' in an attribute value.
XML_STOPPED_BY_USER XML parser stopped by user.
XML_PARSING_ENTITY Error while parsing entity '%1'. %2
XML_E_MISSING_PE_ENTITY Parameter entity must be defined before it is used.
XML_E_MIXEDCONTENT_DUP_NAME The same name must not appear more than once in a single mixed-content declaration: '%1'.
XML_NAME_COLON Entity, EntityRef, PI, Notation names, or NMToken cannot contain a colon.
XML_ELEMENT_UNDECLARED The element '%1' is used but not declared in the DTD/Schema.
XML_ELEMENT_ID_NOT_FOUND The attribute '%1' references the ID '%2' which is not defined anywhere in the document.
XML_DEFAULT_ATTRIBUTE Error in default attribute value defined in DTD/Schema.
XML_XMLNS_RESERVED Reserved namespace '%1' can not be redeclared.
XML_EMPTY_NOT_ALLOWED Element cannot be empty according to the DTD/Schema.
XML_ELEMENT_NOT_COMPLETE Element content is incomplete according to the DTD/Schema.
XML_ROOT_NAME_MISMATCH The name of the top most element must match the name of the DOCTYPE declaration.
XML_INVALID_CONTENT Element content is invalid according to the DTD/Schema.
XML_ATTRIBUTE_NOT_DEFINED The attribute '%1' on this element is not defined in the DTD/Schema.
XML_ATTRIBUTE_FIXED Attribute '%1' has a value which does not match the fixed value defined in the DTD/Schema.
XML_ATTRIBUTE_VALUE Attribute '%1' has an invalid value according to the DTD/Schema.
XML_ILLEGAL_TEXT Text is not allowed in this element according to DTD/Schema.
XML_MULTI_FIXED_VALUES An attribute declaration cannot contain multiple fixed values: '%1'.
XML_NOTATION_DEFINED The notation '%1' is already declared.
XML_ELEMENT_DEFINED The element '%1' is already declared.
XML_ELEMENT_UNDEFINED Reference to undeclared element: '%1'.
XML_XMLNS_UNDEFINED Reference to undeclared namespace prefix: '%1'.
XML_XMLNS_FIXED Attribute '%1' must be a #FIXED attribute.
XML_E_UNKNOWNERROR Unknown error: %1.
XML_REQUIRED_ATTRIBUTE_MISSING Required attribute '%1' is missing.
XML_MISSING_NOTATION Declaration '%1' contains reference to undefined notation '%2'.
XML_ATTLIST_DUPLICATED_ID Cannot define multiple ID attributes on the same element.
XML_ATTLIST_ID_PRESENCE An attribute of type ID must have a declared default of #IMPLIED or #REQUIRED.
XML_XMLLANG_INVALIDID The language ID "%1" is invalid.
XML_PUBLICID_INVALID The public ID "%1" is invalid.
XML_DTD_EXPECTING Expecting: %1.
XML_NAMESPACE_URI_EMPTY Only a default namespace can have an empty URI.
XML_LOAD_EXTERNALENTITY Could not load '%1'.
XML_BAD_ENCODING Unable to save character to '%1' encoding.
SCHEMA_ATTRIBUTEVALUE_NOSUPPORT A namespace was found but not supported at current location.
SCHEMA_SCHEMAROOT_EXPECTED Incorrect definition for the root element in schema.
SCHEMA_ELEMENT_NOSUPPORT Element "%1" is not allowed in this context.
SCHEMA_ETNAME_MISSING An ElementType declaration must contain a "name" attribute.
SCHEMA_ETYPE_MISSING An element declaration must contain a "type" attribute.
SCHEMA_ETORDER_UNKNOWN Schema only supports order type "seq", "one" and "many".
SCHEMA_ELEMENTDT_NOSUPPORT Content must be "textOnly" when using datatype on an Element Type.
SCHEMA_ETORDER_DISABLED Order must be "many" when content is "mixed".
SCHEMA_ETCONTENT_UNKNOWN Content must be of type "empty","eltOnly","textOnly" or "mixed".
SCHEMA_ETMODEL_UNKNOWN The value of model must be either "open" or "closed".
SCHEMA_ELEMENT_DISABLED Cannot contain child elements because content is set to "textOnly".
SCHEMA_ELEMENT_MISSING Must provide at least one "element" in a group.
SCHEMA_ATTRIBUTE_NOTSUPPORT The attribute "%1" on an %2 is not supported.
SCHEMA_ATNAME_MISSING AttributeType declaration must contain a "name" attribute.
SCHEMA_ATNAME_DUPLICATED Duplicated attribute declaration.
SCHEMA_ATREQUIRED_INVALID Invalid value for "required" attribute.
SCHEMA_DTTYPE_UNKNOWN Unknown Attribute datatype.
SCHEMA_DTTYPE_DUPLICATED Duplicated datatype declaration.
SCHEMA_ENUMERATION_MISSING An element with a "values" attribute must contain a type attribute of the value "enumeration".
SCHEMA_DTVALUES_MISSING Must provide a "values" attribute on an element that contains a type attribute of the value "enumeration".
SCHEMA_ATYPE_MISSING Attribute declaration must contain a "type" attribute.
SCHEMA_ATYPE_UNDECLARED The specified attribute must first be declared using an AttributeType declaration.
SCHEMA_GROUP_DISABLED A "group" is not allowed within an ElementType that has a "textOnly" content model.
SCHEMA_GMATTRIBUTE_NOTSUPPORT The attribute "%1" on a group is not supported.
SCHEMA_DTVALUES_VALUES_MISSING The values for enumeration type are missing.
SCHEMA_ATTRIBUTE_DEFAULTVALUE The default value "%1" is invalid.
SCHEMA_DTTYPE_DISABLED Datatype is not allowed when content model is not "textOnly".
SCHEMA_ELEMENT_EMPTY Child element is not allowed when content model is "empty".
SCHEMA_ELEMENT_DATATYPE Child element is not allowed when datatype is set.
SCHEMA_DTTYPE_MISSING Type is missing on the datatype element.
SCHEMA_MINOCCURS_INVALIDVALUE The value of attribute "minOccurs" should be "0" or "1".
SCHEMA_MAXOCCURS_INVALIDVALUE The value of attribute "maxOccurs" should be "1" or "*".
SCHEMA_MAXOCCURS_MUSTBESTAR The value of attribute "maxOccurs" must be "*" when attribute "order" is set to "many".
SCHEMA_ELEMENTDT_EMPTY The value of data type attribute can not be empty.
SCHEMA_DOCTYPE_INVALID DOCTYPE is not allowed in Schema.