Forums

Understanding NSXMLParserErrorDomain error messages

  1. I've been doing some work recently working to make the WP iPhone app a bit more user-friendly when it comes to error messages and adding a blog for the first time.

    This has resulted in several fixes are available in the 2.0 version. One will give you the ability to enter your xmlrpc endpoint manually if it can't be found by the app. Another catches HTML errors and presents them for a clearer understanding of what's going on.

    However, it will always be possible to get NSXMLParserErrorDomain errors (especially from a self-hosted blog) because they refer to errors in the parsing of the XML returned from the blog. Themes or custom php code that results in malformed XML are the common causes.

    Even if the iPhone application is going to ignore the specific "component" the parsing can break if XML is malformed.

    In the 1.3 version, these errors can occur because the server HTML error message was processed by the XML Parser. This is fixed in 2.0.

    Once you're using WP for iPhone 2.0 or later, the error should be a hint about the way in which XML is malformed. A good test is to remove custom code or turn off themes and then try to connect again.

    In order to understand these errors, I've provided a link for you techies to the Apple web page which documents them. For those of you who just want to know the meaning of the message, please look for the number in the list below and read the associated (terse) description further down the page.

    This list is a copy from the Apple page, and therefore is subject to any changes made by Apple since it was posted.

    Here is the link .

    Here is the list from the link as of this post's date:

    Parser Error Constants

    The following error types are defined by NSXMLParser.

    typedef enum {
    NSXMLParserInternalError = 1,
    NSXMLParserOutOfMemoryError = 2,
    NSXMLParserDocumentStartError = 3,
    NSXMLParserEmptyDocumentError = 4,
    NSXMLParserPrematureDocumentEndError = 5,
    NSXMLParserInvalidHexCharacterRefError = 6,
    NSXMLParserInvalidDecimalCharacterRefError = 7,
    NSXMLParserInvalidCharacterRefError = 8,
    NSXMLParserInvalidCharacterError = 9,
    NSXMLParserCharacterRefAtEOFError = 10,
    NSXMLParserCharacterRefInPrologError = 11,
    NSXMLParserCharacterRefInEpilogError = 12,
    NSXMLParserCharacterRefInDTDError = 13,
    NSXMLParserEntityRefAtEOFError = 14,
    NSXMLParserEntityRefInPrologError = 15,
    NSXMLParserEntityRefInEpilogError = 16,
    NSXMLParserEntityRefInDTDError = 17,
    NSXMLParserParsedEntityRefAtEOFError = 18,
    NSXMLParserParsedEntityRefInPrologError = 19,
    NSXMLParserParsedEntityRefInEpilogError = 20,
    NSXMLParserParsedEntityRefInInternalSubsetError = 21,
    NSXMLParserEntityReferenceWithoutNameError = 22,
    NSXMLParserEntityReferenceMissingSemiError = 23,
    NSXMLParserParsedEntityRefNoNameError = 24,
    NSXMLParserParsedEntityRefMissingSemiError = 25,
    NSXMLParserUndeclaredEntityError = 26,
    NSXMLParserUnparsedEntityError = 28,
    NSXMLParserEntityIsExternalError = 29,
    NSXMLParserEntityIsParameterError = 30,
    NSXMLParserUnknownEncodingError = 31,
    NSXMLParserEncodingNotSupportedError = 32,
    NSXMLParserStringNotStartedError = 33,
    NSXMLParserStringNotClosedError = 34,
    NSXMLParserNamespaceDeclarationError = 35,
    NSXMLParserEntityNotStartedError = 36,
    NSXMLParserEntityNotFinishedError = 37,
    NSXMLParserLessThanSymbolInAttributeError = 38,
    NSXMLParserAttributeNotStartedError = 39,
    NSXMLParserAttributeNotFinishedError = 40,
    NSXMLParserAttributeHasNoValueError = 41,
    NSXMLParserAttributeRedefinedError = 42,
    NSXMLParserLiteralNotStartedError = 43,
    NSXMLParserLiteralNotFinishedError = 44,
    NSXMLParserCommentNotFinishedError = 45,
    NSXMLParserProcessingInstructionNotStartedError = 46,
    NSXMLParserProcessingInstructionNotFinishedError = 47,
    NSXMLParserNotationNotStartedError = 48,
    NSXMLParserNotationNotFinishedError = 49,
    NSXMLParserAttributeListNotStartedError = 50,
    NSXMLParserAttributeListNotFinishedError = 51,
    NSXMLParserMixedContentDeclNotStartedError = 52,
    NSXMLParserMixedContentDeclNotFinishedError = 53,
    NSXMLParserElementContentDeclNotStartedError = 54,
    NSXMLParserElementContentDeclNotFinishedError = 55,
    NSXMLParserXMLDeclNotStartedError = 56,
    NSXMLParserXMLDeclNotFinishedError = 57,
    NSXMLParserConditionalSectionNotStartedError = 58,
    NSXMLParserConditionalSectionNotFinishedError = 59,
    NSXMLParserExternalSubsetNotFinishedError = 60,
    NSXMLParserDOCTYPEDeclNotFinishedError = 61,
    NSXMLParserMisplacedCDATAEndStringError = 62,
    NSXMLParserCDATANotFinishedError = 63,
    NSXMLParserMisplacedXMLDeclarationError = 64,
    NSXMLParserSpaceRequiredError = 65,
    NSXMLParserSeparatorRequiredError = 66,
    NSXMLParserNMTOKENRequiredError = 67,
    NSXMLParserNAMERequiredError = 68,
    NSXMLParserPCDATARequiredError = 69,
    NSXMLParserURIRequiredError = 70,
    NSXMLParserPublicIdentifierRequiredError = 71,
    NSXMLParserLTRequiredError = 72,
    NSXMLParserGTRequiredError = 73,
    NSXMLParserLTSlashRequiredError = 74,
    NSXMLParserEqualExpectedError = 75,
    NSXMLParserTagNameMismatchError = 76,
    NSXMLParserUnfinishedTagError = 77,
    NSXMLParserStandaloneValueError = 78,
    NSXMLParserInvalidEncodingNameError = 79,
    NSXMLParserCommentContainsDoubleHyphenError = 80,
    NSXMLParserInvalidEncodingError = 81,
    NSXMLParserExternalStandaloneEntityError = 82,
    NSXMLParserInvalidConditionalSectionError = 83,
    NSXMLParserEntityValueRequiredError = 84,
    NSXMLParserNotWellBalancedError = 85,
    NSXMLParserExtraContentError = 86,
    NSXMLParserInvalidCharacterInEntityError = 87,
    NSXMLParserParsedEntityRefInInternalError = 88,
    NSXMLParserEntityRefLoopError = 89,
    NSXMLParserEntityBoundaryError = 90,
    NSXMLParserInvalidURIError = 91,
    NSXMLParserURIFragmentError = 92,
    NSXMLParserNoDTDError = 94,
    NSXMLParserDelegateAbortedParseError = 512
    } NSXMLParserError;

    Constants

    NSXMLParserInternalError

    The parser object encountered an internal error.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserOutOfMemoryError

    The parser object ran out of memory.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserDocumentStartError

    The parser object is unable to start parsing.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEmptyDocumentError

    The document is empty.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserPrematureDocumentEndError

    The document ended unexpectedly.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserInvalidHexCharacterRefError

    Invalid hexadecimal character reference encountered.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserInvalidDecimalCharacterRefError

    Invalid decimal character reference encountered.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserInvalidCharacterRefError

    Invalid character reference encountered.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserInvalidCharacterError

    Invalid character encountered.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserCharacterRefAtEOFError

    Target of character reference cannot be found.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserCharacterRefInPrologError

    Invalid character found in the prolog.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserCharacterRefInEpilogError

    Invalid character found in the epilog.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserCharacterRefInDTDError

    Invalid character encountered in the DTD.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEntityRefAtEOFError

    Target of entity reference is not found.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEntityRefInPrologError

    Invalid entity reference found in the prolog.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEntityRefInEpilogError

    Invalid entity reference found in the epilog.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEntityRefInDTDError

    Invalid entity reference found in the DTD.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserParsedEntityRefAtEOFError

    Target of parsed entity reference is not found.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserParsedEntityRefInPrologError

    Target of parsed entity reference is not found in prolog.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserParsedEntityRefInEpilogError

    Target of parsed entity reference is not found in epilog.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserParsedEntityRefInInternalSubsetError

    Target of parsed entity reference is not found in internal subset.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEntityReferenceWithoutNameError

    Entity reference is without name.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEntityReferenceMissingSemiError

    Entity reference is missing semicolon.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserParsedEntityRefNoNameError

    Parsed entity reference is without an entity name.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserParsedEntityRefMissingSemiError

    Parsed entity reference is missing semicolon.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserUndeclaredEntityError

    Entity is not declared.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserUnparsedEntityError

    Cannot parse entity.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEntityIsExternalError

    Cannot parse external entity.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEntityIsParameterError

    Entity is a parameter.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserUnknownEncodingError

    Document encoding is unknown.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEncodingNotSupportedError

    Document encoding is not supported.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserStringNotStartedError

    String is not started.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserStringNotClosedError

    String is not closed.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserNamespaceDeclarationError

    Invalid namespace declaration encountered.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEntityNotStartedError

    Entity is not started.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEntityNotFinishedError

    Entity is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserLessThanSymbolInAttributeError

    Angle bracket is used in attribute.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserAttributeNotStartedError

    Attribute is not started.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserAttributeNotFinishedError

    Attribute is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserAttributeHasNoValueError

    Attribute doesn’t contain a value.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserAttributeRedefinedError

    Attribute is redefined.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserLiteralNotStartedError

    Literal is not started.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserLiteralNotFinishedError

    Literal is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserCommentNotFinishedError

    Comment is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserProcessingInstructionNotStartedError

    Processing instruction is not started.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserProcessingInstructionNotFinishedError

    Processing instruction is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserNotationNotStartedError

    Notation is not started.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserNotationNotFinishedError

    Notation is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserAttributeListNotStartedError

    Attribute list is not started.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserAttributeListNotFinishedError

    Attribute list is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserMixedContentDeclNotStartedError

    Mixed content declaration is not started.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserMixedContentDeclNotFinishedError

    Mixed content declaration is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserElementContentDeclNotStartedError

    Element content declaration is not started.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserElementContentDeclNotFinishedError

    Element content declaration is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserXMLDeclNotStartedError

    XML declaration is not started.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserXMLDeclNotFinishedError

    XML declaration is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserConditionalSectionNotStartedError

    Conditional section is not started.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserConditionalSectionNotFinishedError

    Conditional section is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserExternalSubsetNotFinishedError

    External subset is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserDOCTYPEDeclNotFinishedError

    Document type declaration is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserMisplacedCDATAEndStringError

    Misplaced CDATA end string.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserCDATANotFinishedError

    CDATA block is not finished.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserMisplacedXMLDeclarationError

    Misplaced XML declaration.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserSpaceRequiredError

    Space is required.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserSeparatorRequiredError

    Separator is required.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserNMTOKENRequiredError

    Name token is required.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserNAMERequiredError

    Name is required.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserPCDATARequiredError

    CDATA is required.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserURIRequiredError

    URI is required.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserPublicIdentifierRequiredError

    Public identifier is required.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserLTRequiredError

    Left angle bracket is required.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserGTRequiredError

    Right angle bracket is required.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserLTSlashRequiredError

    Left angle bracket slash is required.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEqualExpectedError

    Equal sign expected.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserTagNameMismatchError

    Tag name mismatch.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserUnfinishedTagError

    Unfinished tag found.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserStandaloneValueError

    Standalone value found.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserInvalidEncodingNameError

    Invalid encoding name found.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserCommentContainsDoubleHyphenError

    Comment contains double hyphen.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserInvalidEncodingError

    Invalid encoding.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserExternalStandaloneEntityError

    External standalone entity.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserInvalidConditionalSectionError

    Invalid conditional section.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEntityValueRequiredError

    Entity value is required.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserNotWellBalancedError

    Document is not well balanced.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserExtraContentError

    Error in content found.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserInvalidCharacterInEntityError

    Invalid character in entity found.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserParsedEntityRefInInternalError

    Internal error in parsed entity reference found.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEntityRefLoopError

    Entity reference loop encountered.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserEntityBoundaryError

    Entity boundary error.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserInvalidURIError

    Invalid URI specified.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserURIFragmentError

    URI fragment.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserNoDTDError

    Missing DTD.

    Available in Mac OS X v10.3 and later.

    Declared in NSXMLParser.h.
    NSXMLParserDelegateAbortedParseError

    Delegate aborted parse.

Topic Closed

This topic has been closed to new replies.


About this Topic