class LibXML::XML::Error
The XML::Error
class exposes libxml errors as standard Ruby exceptions. When appropriate, libxml-ruby will raise an exception - for example, when parsing a non-well formed xml document.
By default, warnings, errors and fatal errors that libxml generates are printed to STDERR via the XML::Error::VERBOSE_HANDLER proc.
To disable this output you can install the quiet handler:
XML::Error.set_handler(&XML::Error::QUIET_HANDLER)
Get the current handler:
proc = XML::Error.get_handler
Install your own handler:
XML::Error.set_handler do |error| puts error.to_s end
Or remove all handlers:
XML::Error.reset_handler
Constants
- ATTLIST_NOT_FINISHED
- ATTLIST_NOT_STARTED
- ATTRIBUTE_NOT_FINISHED
- ATTRIBUTE_NOT_STARTED
- ATTRIBUTE_REDEFINED
- ATTRIBUTE_WITHOUT_VALUE
- C14N
- C14N_CREATE_CTXT
- C14N_CREATE_STACK
- C14N_INVALID_NODE
- C14N_RELATIVE_NAMESPACE
- C14N_REQUIRES_UTF8
- C14N_UNKNOW_NODE
- CATALOG
- CATALOG_ENTRY_BROKEN
- CATALOG_MISSING_ATTR
- CATALOG_NOT_CATALOG
- CATALOG_PREFER_VALUE
- CATALOG_RECURSION
- CDATA_NOT_FINISHED
- CHARREF_AT_EOF
- CHARREF_IN_DTD
- CHARREF_IN_EPILOG
- CHARREF_IN_PROLOG
- CHECK
- CHECK_ENTITY_TYPE
- CHECK_FOUND_ATTRIBUTE
- CHECK_FOUND_CDATA
- CHECK_FOUND_COMMENT
- CHECK_FOUND_DOCTYPE
- CHECK_FOUND_ELEMENT
- CHECK_FOUND_ENTITY
- CHECK_FOUND_ENTITYREF
- CHECK_FOUND_FRAGMENT
- CHECK_FOUND_NOTATION
- CHECK_FOUND_PI
- CHECK_FOUND_TEXT
- CHECK_NAME_NOT_NULL
- CHECK_NOT_ATTR
- CHECK_NOT_ATTR_DECL
- CHECK_NOT_DTD
- CHECK_NOT_ELEM_DECL
- CHECK_NOT_ENTITY_DECL
- CHECK_NOT_NCNAME
- CHECK_NOT_NS_DECL
- CHECK_NOT_UTF8
- CHECK_NO_DICT
- CHECK_NO_DOC
- CHECK_NO_ELEM
- CHECK_NO_HREF
- CHECK_NO_NAME
- CHECK_NO_NEXT
- CHECK_NO_PARENT
- CHECK_NO_PREV
- CHECK_NS_ANCESTOR
- CHECK_NS_SCOPE
- CHECK_OUTSIDE_DICT
- CHECK_UNKNOWN_NODE
- CHECK_WRONG_DOC
- CHECK_WRONG_NAME
- CHECK_WRONG_NEXT
- CHECK_WRONG_PARENT
- CHECK_WRONG_PREV
- COMMENT_NOT_FINISHED
- CONDSEC_INVALID
- CONDSEC_INVALID_KEYWORD
- CONDSEC_NOT_FINISHED
- CONDSEC_NOT_STARTED
- DATATYPE
- DOCTYPE_NOT_FINISHED
- DOCUMENT_EMPTY
- DOCUMENT_END
- DOCUMENT_START
- DOMAIN_CODE_MAP
Create mapping from domain constant values to keys
- DTD
- DTD_ATTRIBUTE_DEFAULT
- DTD_ATTRIBUTE_REDEFINED
- DTD_ATTRIBUTE_VALUE
- DTD_CONTENT_ERROR
- DTD_CONTENT_MODEL
- DTD_CONTENT_NOT_DETERMINIST
- DTD_DIFFERENT_PREFIX
- DTD_ELEM_DEFAULT_NAMESPACE
- DTD_ELEM_NAMESPACE
- DTD_ELEM_REDEFINED
- DTD_EMPTY_NOTATION
- DTD_ENTITY_TYPE
- DTD_ID_FIXED
- DTD_ID_REDEFINED
- DTD_ID_SUBSET
- DTD_INVALID_CHILD
- DTD_INVALID_DEFAULT
- DTD_LOAD_ERROR
- DTD_MISSING_ATTRIBUTE
- DTD_MIXED_CORRUPT
- DTD_MULTIPLE_ID
- DTD_NOTATION_REDEFINED
- DTD_NOTATION_VALUE
- DTD_NOT_EMPTY
- DTD_NOT_PCDATA
- DTD_NOT_STANDALONE
- DTD_NO_DOC
- DTD_NO_DTD
- DTD_NO_ELEM_NAME
- DTD_NO_PREFIX
- DTD_NO_ROOT
- DTD_ROOT_NAME
- DTD_STANDALONE_DEFAULTED
- DTD_STANDALONE_WHITE_SPACE
- DTD_UNKNOWN_ATTRIBUTE
- DTD_UNKNOWN_ELEM
- DTD_UNKNOWN_ENTITY
- DTD_UNKNOWN_ID
- DTD_UNKNOWN_NOTATION
- DTD_XMLID_TYPE
- DTD_XMLID_VALUE
- ELEMCONTENT_NOT_FINISHED
- ELEMCONTENT_NOT_STARTED
- ENCODING_NAME
- ENTITYREF_AT_EOF
- ENTITYREF_IN_DTD
- ENTITYREF_IN_EPILOG
- ENTITYREF_IN_PROLOG
- ENTITYREF_NO_NAME
- ENTITYREF_SEMICOL_MISSING
- ENTITY_BOUNDARY
- ENTITY_CHAR_ERROR
- ENTITY_IS_EXTERNAL
- ENTITY_IS_PARAMETER
- ENTITY_LOOP
- ENTITY_NOT_FINISHED
- ENTITY_NOT_STARTED
- ENTITY_PE_INTERNAL
- ENTITY_PROCESSING
- EQUAL_REQUIRED
- ERROR
- ERROR_CODE_MAP
Create mapping from error constant values (so need to remove domain_codes) to keys
- EXTRA_CONTENT
- EXT_ENTITY_STANDALONE
- EXT_SUBSET_NOT_FINISHED
- FATAL
- FTP
- FTP_ACCNT
- FTP_EPSV_ANSWER
- FTP_PASV_ANSWER
- FTP_URL_SYNTAX
- GT_REQUIRED
- HTML
- HTML_STRUCURE_ERROR
- HTML_UNKNOWN_TAG
- HTTP
- HTTP_UNKNOWN_HOST
- HTTP_URL_SYNTAX
- HTTP_USE_IP
- HYPHEN_IN_COMMENT
- I18N
- I18N_CONV_FAILED
- I18N_EXCESS_HANDLER
- I18N_NO_HANDLER
- I18N_NO_NAME
- I18N_NO_OUTPUT
- INTERNAL_ERROR
- INVALID_CHAR
- INVALID_CHARREF
- INVALID_DEC_CHARREF
- INVALID_ENCODING
- INVALID_HEX_CHARREF
- INVALID_URI
- IO
- IO_BUFFER_FULL
- IO_EACCES
- IO_EADDRINUSE
- IO_EAFNOSUPPORT
- IO_EAGAIN
- IO_EALREADY
- IO_EBADF
- IO_EBADMSG
- IO_EBUSY
- IO_ECANCELED
- IO_ECHILD
- IO_ECONNREFUSED
- IO_EDEADLK
- IO_EDOM
- IO_EEXIST
- IO_EFAULT
- IO_EFBIG
- IO_EINPROGRESS
- IO_EINTR
- IO_EINVAL
- IO_EIO
- IO_EISCONN
- IO_EISDIR
- IO_EMFILE
- IO_EMLINK
- IO_EMSGSIZE
- IO_ENAMETOOLONG
- IO_ENCODER
- IO_ENETUNREACH
- IO_ENFILE
- IO_ENODEV
- IO_ENOENT
- IO_ENOEXEC
- IO_ENOLCK
- IO_ENOMEM
- IO_ENOSPC
- IO_ENOSYS
- IO_ENOTDIR
- IO_ENOTEMPTY
- IO_ENOTSOCK
- IO_ENOTSUP
- IO_ENOTTY
- IO_ENXIO
- IO_EPERM
- IO_EPIPE
- IO_ERANGE
- IO_EROFS
- IO_ESPIPE
- IO_ESRCH
- IO_ETIMEDOUT
- IO_EXDEV
- IO_FLUSH
- IO_LOAD_ERROR
- IO_NETWORK_ATTEMPT
- IO_NO_INPUT
- IO_UNKNOWN
- IO_WRITE
- LITERAL_NOT_FINISHED
- LITERAL_NOT_STARTED
- LTSLASH_REQUIRED
- LT_IN_ATTRIBUTE
- LT_REQUIRED
- MEMORY
- MISPLACED_CDATA_END
- MISSING_ENCODING
- MIXED_NOT_FINISHED
- MIXED_NOT_STARTED
- MODULE
- MODULE_CLOSE
- MODULE_OPEN
- NAMESPACE
- NAME_REQUIRED
- NMTOKEN_REQUIRED
- NONE
xml error levels
- NOTATION_NOT_FINISHED
- NOTATION_NOT_STARTED
- NOTATION_PROCESSING
- NOT_STANDALONE
- NOT_WELL_BALANCED
- NO_DTD
- NO_ERROR
xml error domains
- NO_MEMORY
- NS_DECL_ERROR
- NS_ERR_ATTRIBUTE_REDEFINED
- NS_ERR_COLON
- NS_ERR_EMPTY
- NS_ERR_QNAME
- NS_ERR_UNDEFINED_NAMESPACE
- NS_ERR_XML_NAMESPACE
- OK
errors
- OUTPUT
- PARSER
- PCDATA_REQUIRED
- PEREF_AT_EOF
- PEREF_IN_EPILOG
- PEREF_IN_INT_SUBSET
- PEREF_IN_PROLOG
- PEREF_NO_NAME
- PEREF_SEMICOL_MISSING
- PI_NOT_FINISHED
- PI_NOT_STARTED
- PUBID_REQUIRED
- QUIET_HANDLER
Quiet error handler
- REGEXP
- REGEXP_COMPILE_ERROR
- RELAXNGP
- RELAXNGV
- RESERVED_XML_NAME
- RNGP_ANYNAME_ATTR_ANCESTOR
- RNGP_ATTRIBUTE_CHILDREN
- RNGP_ATTRIBUTE_CONTENT
- RNGP_ATTRIBUTE_EMPTY
- RNGP_ATTRIBUTE_NOOP
- RNGP_ATTR_CONFLICT
- RNGP_CHOICE_CONTENT
- RNGP_CHOICE_EMPTY
- RNGP_CREATE_FAILURE
- RNGP_DATA_CONTENT
- RNGP_DEFINE_CREATE_FAILED
- RNGP_DEFINE_EMPTY
- RNGP_DEFINE_MISSING
- RNGP_DEFINE_NAME_MISSING
- RNGP_DEF_CHOICE_AND_INTERLEAVE
- RNGP_ELEMENT_CONTENT
- RNGP_ELEMENT_EMPTY
- RNGP_ELEMENT_NAME
- RNGP_ELEMENT_NO_CONTENT
- RNGP_ELEM_CONTENT_EMPTY
- RNGP_ELEM_CONTENT_ERROR
- RNGP_ELEM_TEXT_CONFLICT
- RNGP_EMPTY
- RNGP_EMPTY_CONSTRUCT
- RNGP_EMPTY_CONTENT
- RNGP_EMPTY_NOT_EMPTY
- RNGP_ERROR_TYPE_LIB
- RNGP_EXCEPT_EMPTY
- RNGP_EXCEPT_MISSING
- RNGP_EXCEPT_MULTIPLE
- RNGP_EXCEPT_NO_CONTENT
- RNGP_EXTERNALREF_EMTPY
- RNGP_EXTERNALREF_RECURSE
- RNGP_EXTERNAL_REF_FAILURE
- RNGP_FORBIDDEN_ATTRIBUTE
- RNGP_FOREIGN_ELEMENT
- RNGP_GRAMMAR_CONTENT
- RNGP_GRAMMAR_EMPTY
- RNGP_GRAMMAR_MISSING
- RNGP_GRAMMAR_NO_START
- RNGP_GROUP_ATTR_CONFLICT
- RNGP_HREF_ERROR
- RNGP_INCLUDE_EMPTY
- RNGP_INCLUDE_FAILURE
- RNGP_INCLUDE_RECURSE
- RNGP_INTERLEAVE_ADD
- RNGP_INTERLEAVE_CREATE_FAILED
- RNGP_INTERLEAVE_EMPTY
- RNGP_INTERLEAVE_NO_CONTENT
- RNGP_INVALID_DEFINE_NAME
- RNGP_INVALID_URI
- RNGP_INVALID_VALUE
- RNGP_MISSING_HREF
- RNGP_NAME_MISSING
- RNGP_NEED_COMBINE
- RNGP_NOTALLOWED_NOT_EMPTY
- RNGP_NSNAME_ATTR_ANCESTOR
- RNGP_NSNAME_NO_NS
- RNGP_PARAM_FORBIDDEN
- RNGP_PARAM_NAME_MISSING
- RNGP_PARENTREF_CREATE_FAILED
- RNGP_PARENTREF_NAME_INVALID
- RNGP_PARENTREF_NOT_EMPTY
- RNGP_PARENTREF_NO_NAME
- RNGP_PARENTREF_NO_PARENT
- RNGP_PARSE_ERROR
- RNGP_PAT_ANYNAME_EXCEPT_ANYNAME
- RNGP_PAT_ATTR_ATTR
- RNGP_PAT_ATTR_ELEM
- RNGP_PAT_DATA_EXCEPT_ATTR
- RNGP_PAT_DATA_EXCEPT_ELEM
- RNGP_PAT_DATA_EXCEPT_EMPTY
- RNGP_PAT_DATA_EXCEPT_GROUP
- RNGP_PAT_DATA_EXCEPT_INTERLEAVE
- RNGP_PAT_DATA_EXCEPT_LIST
- RNGP_PAT_DATA_EXCEPT_ONEMORE
- RNGP_PAT_DATA_EXCEPT_REF
- RNGP_PAT_DATA_EXCEPT_TEXT
- RNGP_PAT_LIST_ATTR
- RNGP_PAT_LIST_ELEM
- RNGP_PAT_LIST_INTERLEAVE
- RNGP_PAT_LIST_LIST
- RNGP_PAT_LIST_REF
- RNGP_PAT_LIST_TEXT
- RNGP_PAT_NSNAME_EXCEPT_ANYNAME
- RNGP_PAT_NSNAME_EXCEPT_NSNAME
- RNGP_PAT_ONEMORE_GROUP_ATTR
- RNGP_PAT_ONEMORE_INTERLEAVE_ATTR
- RNGP_PAT_START_ATTR
- RNGP_PAT_START_DATA
- RNGP_PAT_START_EMPTY
- RNGP_PAT_START_GROUP
- RNGP_PAT_START_INTERLEAVE
- RNGP_PAT_START_LIST
- RNGP_PAT_START_ONEMORE
- RNGP_PAT_START_TEXT
- RNGP_PAT_START_VALUE
- RNGP_PREFIX_UNDEFINED
- RNGP_REF_CREATE_FAILED
- RNGP_REF_CYCLE
- RNGP_REF_NAME_INVALID
- RNGP_REF_NOT_EMPTY
- RNGP_REF_NO_DEF
- RNGP_REF_NO_NAME
- RNGP_START_CHOICE_AND_INTERLEAVE
- RNGP_START_CONTENT
- RNGP_START_EMPTY
- RNGP_START_MISSING
- RNGP_TEXT_EXPECTED
- RNGP_TEXT_HAS_CHILD
- RNGP_TYPE_MISSING
- RNGP_TYPE_NOT_FOUND
- RNGP_TYPE_VALUE
- RNGP_UNKNOWN_ATTRIBUTE
- RNGP_UNKNOWN_COMBINE
- RNGP_UNKNOWN_CONSTRUCT
- RNGP_UNKNOWN_TYPE_LIB
- RNGP_URI_FRAGMENT
- RNGP_URI_NOT_ABSOLUTE
- RNGP_VALUE_EMPTY
- RNGP_VALUE_NO_CONTENT
- RNGP_XMLNS_NAME
- RNGP_XML_NS
- SAVE_CHAR_INVALID
- SAVE_NOT_UTF8
- SAVE_NO_DOCTYPE
- SAVE_UNKNOWN_ENCODING
- SCHEMAP_AG_PROPS_CORRECT
- SCHEMAP_ATTRFORMDEFAULT_VALUE
- SCHEMAP_ATTRGRP_NONAME_NOREF
- SCHEMAP_ATTR_NONAME_NOREF
- SCHEMAP_AU_PROPS_CORRECT
- SCHEMAP_AU_PROPS_CORRECT_2
- SCHEMAP_A_PROPS_CORRECT_2
- SCHEMAP_A_PROPS_CORRECT_3
- SCHEMAP_COMPLEXTYPE_NONAME_NOREF
- SCHEMAP_COS_ALL_LIMITED
- SCHEMAP_COS_CT_EXTENDS_1_1
- SCHEMAP_COS_CT_EXTENDS_1_2
- SCHEMAP_COS_CT_EXTENDS_1_3
- SCHEMAP_COS_ST_DERIVED_OK_2_1
- SCHEMAP_COS_ST_DERIVED_OK_2_2
- SCHEMAP_COS_ST_RESTRICTS_1_1
- SCHEMAP_COS_ST_RESTRICTS_1_2
- SCHEMAP_COS_ST_RESTRICTS_1_3_1
- SCHEMAP_COS_ST_RESTRICTS_1_3_2
- SCHEMAP_COS_ST_RESTRICTS_2_1
- SCHEMAP_COS_ST_RESTRICTS_2_3_1_1
- SCHEMAP_COS_ST_RESTRICTS_2_3_1_2
- SCHEMAP_COS_ST_RESTRICTS_2_3_2_1
- SCHEMAP_COS_ST_RESTRICTS_2_3_2_2
- SCHEMAP_COS_ST_RESTRICTS_2_3_2_3
- SCHEMAP_COS_ST_RESTRICTS_2_3_2_4
- SCHEMAP_COS_ST_RESTRICTS_2_3_2_5
- SCHEMAP_COS_ST_RESTRICTS_3_1
- SCHEMAP_COS_ST_RESTRICTS_3_3_1
- SCHEMAP_COS_ST_RESTRICTS_3_3_1_2
- SCHEMAP_COS_ST_RESTRICTS_3_3_2_1
- SCHEMAP_COS_ST_RESTRICTS_3_3_2_2
- SCHEMAP_COS_ST_RESTRICTS_3_3_2_3
- SCHEMAP_COS_ST_RESTRICTS_3_3_2_4
- SCHEMAP_COS_ST_RESTRICTS_3_3_2_5
- SCHEMAP_COS_VALID_DEFAULT_1
- SCHEMAP_COS_VALID_DEFAULT_2_1
- SCHEMAP_COS_VALID_DEFAULT_2_2_1
- SCHEMAP_COS_VALID_DEFAULT_2_2_2
- SCHEMAP_CT_PROPS_CORRECT_1
- SCHEMAP_CT_PROPS_CORRECT_2
- SCHEMAP_CT_PROPS_CORRECT_3
- SCHEMAP_CT_PROPS_CORRECT_4
- SCHEMAP_CT_PROPS_CORRECT_5
- SCHEMAP_CVC_SIMPLE_TYPE
- SCHEMAP_C_PROPS_CORRECT
- SCHEMAP_DEF_AND_PREFIX
- SCHEMAP_DERIVATION_OK_RESTRICTION_1
- SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1
- SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2
- SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3
- SCHEMAP_DERIVATION_OK_RESTRICTION_2_2
- SCHEMAP_DERIVATION_OK_RESTRICTION_3
- SCHEMAP_DERIVATION_OK_RESTRICTION_4_1
- SCHEMAP_DERIVATION_OK_RESTRICTION_4_2
- SCHEMAP_DERIVATION_OK_RESTRICTION_4_3
- SCHEMAP_ELEMFORMDEFAULT_VALUE
- SCHEMAP_ELEM_DEFAULT_FIXED
- SCHEMAP_ELEM_NONAME_NOREF
- SCHEMAP_EXTENSION_NO_BASE
- SCHEMAP_E_PROPS_CORRECT_2
- SCHEMAP_E_PROPS_CORRECT_3
- SCHEMAP_E_PROPS_CORRECT_4
- SCHEMAP_E_PROPS_CORRECT_5
- SCHEMAP_E_PROPS_CORRECT_6
- SCHEMAP_FACET_NO_VALUE
- SCHEMAP_FAILED_BUILD_IMPORT
- SCHEMAP_FAILED_LOAD
- SCHEMAP_FAILED_PARSE
- SCHEMAP_GROUP_NONAME_NOREF
- SCHEMAP_IMPORT_NAMESPACE_NOT_URI
- SCHEMAP_IMPORT_REDEFINE_NSNAME
- SCHEMAP_IMPORT_SCHEMA_NOT_URI
- SCHEMAP_INCLUDE_SCHEMA_NOT_URI
- SCHEMAP_INCLUDE_SCHEMA_NO_URI
- SCHEMAP_INTERNAL
- SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE
- SCHEMAP_INVALID_ATTR_COMBINATION
- SCHEMAP_INVALID_ATTR_INLINE_COMBINATION
- SCHEMAP_INVALID_ATTR_NAME
- SCHEMAP_INVALID_ATTR_USE
- SCHEMAP_INVALID_BOOLEAN
- SCHEMAP_INVALID_ENUM
- SCHEMAP_INVALID_FACET
- SCHEMAP_INVALID_FACET_VALUE
- SCHEMAP_INVALID_MAXOCCURS
- SCHEMAP_INVALID_MINOCCURS
- SCHEMAP_INVALID_REF_AND_SUBTYPE
- SCHEMAP_INVALID_WHITE_SPACE
- SCHEMAP_MG_PROPS_CORRECT_1
- SCHEMAP_MG_PROPS_CORRECT_2
- SCHEMAP_MISSING_SIMPLETYPE_CHILD
- SCHEMAP_NOATTR_NOREF
- SCHEMAP_NOROOT
- SCHEMAP_NOTATION_NO_NAME
- SCHEMAP_NOTHING_TO_PARSE
- SCHEMAP_NOTYPE_NOREF
- SCHEMAP_NOT_DETERMINISTIC
- SCHEMAP_NOT_SCHEMA
- SCHEMAP_NO_XMLNS
- SCHEMAP_NO_XSI
- SCHEMAP_PREFIX_UNDEFINED
- SCHEMAP_P_PROPS_CORRECT_1
- SCHEMAP_P_PROPS_CORRECT_2_1
- SCHEMAP_P_PROPS_CORRECT_2_2
- SCHEMAP_RECURSIVE
- SCHEMAP_REDEFINED_ATTR
- SCHEMAP_REDEFINED_ATTRGROUP
- SCHEMAP_REDEFINED_ELEMENT
- SCHEMAP_REDEFINED_GROUP
- SCHEMAP_REDEFINED_NOTATION
- SCHEMAP_REDEFINED_TYPE
- SCHEMAP_REF_AND_CONTENT
- SCHEMAP_REF_AND_SUBTYPE
- SCHEMAP_REGEXP_INVALID
- SCHEMAP_RESTRICTION_NONAME_NOREF
- SCHEMAP_S4S_ATTR_INVALID_VALUE
- SCHEMAP_S4S_ATTR_MISSING
- SCHEMAP_S4S_ATTR_NOT_ALLOWED
- SCHEMAP_S4S_ELEM_MISSING
- SCHEMAP_S4S_ELEM_NOT_ALLOWED
- SCHEMAP_SIMPLETYPE_NONAME
- SCHEMAP_SRC_ATTRIBUTE_1
- SCHEMAP_SRC_ATTRIBUTE_2
- SCHEMAP_SRC_ATTRIBUTE_3_1
- SCHEMAP_SRC_ATTRIBUTE_3_2
- SCHEMAP_SRC_ATTRIBUTE_4
- SCHEMAP_SRC_ATTRIBUTE_GROUP_1
- SCHEMAP_SRC_ATTRIBUTE_GROUP_2
- SCHEMAP_SRC_ATTRIBUTE_GROUP_3
- SCHEMAP_SRC_CT_1
- SCHEMAP_SRC_ELEMENT_1
- SCHEMAP_SRC_ELEMENT_2_1
- SCHEMAP_SRC_ELEMENT_2_2
- SCHEMAP_SRC_ELEMENT_3
- SCHEMAP_SRC_IMPORT
- SCHEMAP_SRC_IMPORT_1_1
- SCHEMAP_SRC_IMPORT_1_2
- SCHEMAP_SRC_IMPORT_2
- SCHEMAP_SRC_IMPORT_2_1
- SCHEMAP_SRC_IMPORT_2_2
- SCHEMAP_SRC_IMPORT_3_1
- SCHEMAP_SRC_IMPORT_3_2
- SCHEMAP_SRC_INCLUDE
- SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE
- SCHEMAP_SRC_REDEFINE
- SCHEMAP_SRC_RESOLVE
- SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE
- SCHEMAP_SRC_SIMPLE_TYPE_1
- SCHEMAP_SRC_SIMPLE_TYPE_2
- SCHEMAP_SRC_SIMPLE_TYPE_3
- SCHEMAP_SRC_SIMPLE_TYPE_4
- SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES
- SCHEMAP_ST_PROPS_CORRECT_1
- SCHEMAP_ST_PROPS_CORRECT_2
- SCHEMAP_ST_PROPS_CORRECT_3
- SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE
- SCHEMAP_TYPE_AND_SUBTYPE
- SCHEMAP_UNION_NOT_EXPRESSIBLE
- SCHEMAP_UNKNOWN_ALL_CHILD
- SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD
- SCHEMAP_UNKNOWN_ATTRGRP_CHILD
- SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP
- SCHEMAP_UNKNOWN_ATTR_CHILD
- SCHEMAP_UNKNOWN_BASE_TYPE
- SCHEMAP_UNKNOWN_CHOICE_CHILD
- SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD
- SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD
- SCHEMAP_UNKNOWN_ELEM_CHILD
- SCHEMAP_UNKNOWN_EXTENSION_CHILD
- SCHEMAP_UNKNOWN_FACET_CHILD
- SCHEMAP_UNKNOWN_FACET_TYPE
- SCHEMAP_UNKNOWN_GROUP_CHILD
- SCHEMAP_UNKNOWN_IMPORT_CHILD
- SCHEMAP_UNKNOWN_INCLUDE_CHILD
- SCHEMAP_UNKNOWN_LIST_CHILD
- SCHEMAP_UNKNOWN_MEMBER_TYPE
- SCHEMAP_UNKNOWN_NOTATION_CHILD
- SCHEMAP_UNKNOWN_PREFIX
- SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD
- SCHEMAP_UNKNOWN_REF
- SCHEMAP_UNKNOWN_RESTRICTION_CHILD
- SCHEMAP_UNKNOWN_SCHEMAS_CHILD
- SCHEMAP_UNKNOWN_SEQUENCE_CHILD
- SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD
- SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD
- SCHEMAP_UNKNOWN_TYPE
- SCHEMAP_UNKNOWN_UNION_CHILD
- SCHEMAP_WARN_ATTR_POINTLESS_PROH
- SCHEMAP_WARN_ATTR_REDECL_PROH
- SCHEMAP_WARN_SKIP_SCHEMA
- SCHEMAP_WARN_UNLOCATED_SCHEMA
- SCHEMAP_WILDCARD_INVALID_NS_MEMBER
- SCHEMASP
- SCHEMASV
- SCHEMATRONV
- SCHEMATRONV_ASSERT
- SCHEMATRONV_REPORT
- SCHEMAV_ATTRINVALID
- SCHEMAV_ATTRUNKNOWN
- SCHEMAV_CONSTRUCT
- SCHEMAV_CVC_ATTRIBUTE_1
- SCHEMAV_CVC_ATTRIBUTE_2
- SCHEMAV_CVC_ATTRIBUTE_3
- SCHEMAV_CVC_ATTRIBUTE_4
- SCHEMAV_CVC_AU
- SCHEMAV_CVC_COMPLEX_TYPE_1
- SCHEMAV_CVC_COMPLEX_TYPE_2_1
- SCHEMAV_CVC_COMPLEX_TYPE_2_2
- SCHEMAV_CVC_COMPLEX_TYPE_2_3
- SCHEMAV_CVC_COMPLEX_TYPE_2_4
- SCHEMAV_CVC_COMPLEX_TYPE_3_1
- SCHEMAV_CVC_COMPLEX_TYPE_3_2_1
- SCHEMAV_CVC_COMPLEX_TYPE_3_2_2
- SCHEMAV_CVC_COMPLEX_TYPE_4
- SCHEMAV_CVC_COMPLEX_TYPE_5_1
- SCHEMAV_CVC_COMPLEX_TYPE_5_2
- SCHEMAV_CVC_DATATYPE_VALID_1_2_1
- SCHEMAV_CVC_DATATYPE_VALID_1_2_2
- SCHEMAV_CVC_DATATYPE_VALID_1_2_3
- SCHEMAV_CVC_ELT_1
- SCHEMAV_CVC_ELT_2
- SCHEMAV_CVC_ELT_3_1
- SCHEMAV_CVC_ELT_3_2_1
- SCHEMAV_CVC_ELT_3_2_2
- SCHEMAV_CVC_ELT_4_1
- SCHEMAV_CVC_ELT_4_2
- SCHEMAV_CVC_ELT_4_3
- SCHEMAV_CVC_ELT_5_1_1
- SCHEMAV_CVC_ELT_5_1_2
- SCHEMAV_CVC_ELT_5_2_1
- SCHEMAV_CVC_ELT_5_2_2_1
- SCHEMAV_CVC_ELT_5_2_2_2_1
- SCHEMAV_CVC_ELT_5_2_2_2_2
- SCHEMAV_CVC_ELT_6
- SCHEMAV_CVC_ELT_7
- SCHEMAV_CVC_ENUMERATION_VALID
- SCHEMAV_CVC_FACET_VALID
- SCHEMAV_CVC_FRACTIONDIGITS_VALID
- SCHEMAV_CVC_IDC
- SCHEMAV_CVC_LENGTH_VALID
- SCHEMAV_CVC_MAXEXCLUSIVE_VALID
- SCHEMAV_CVC_MAXINCLUSIVE_VALID
- SCHEMAV_CVC_MAXLENGTH_VALID
- SCHEMAV_CVC_MINEXCLUSIVE_VALID
- SCHEMAV_CVC_MININCLUSIVE_VALID
- SCHEMAV_CVC_MINLENGTH_VALID
- SCHEMAV_CVC_PATTERN_VALID
- SCHEMAV_CVC_TOTALDIGITS_VALID
- SCHEMAV_CVC_TYPE_1
- SCHEMAV_CVC_TYPE_2
- SCHEMAV_CVC_TYPE_3_1_1
- SCHEMAV_CVC_TYPE_3_1_2
- SCHEMAV_CVC_WILDCARD
- SCHEMAV_DOCUMENT_ELEMENT_MISSING
- SCHEMAV_ELEMCONT
- SCHEMAV_ELEMENT_CONTENT
- SCHEMAV_EXTRACONTENT
- SCHEMAV_FACET
- SCHEMAV_HAVEDEFAULT
- SCHEMAV_INTERNAL
- SCHEMAV_INVALIDATTR
- SCHEMAV_INVALIDELEM
- SCHEMAV_ISABSTRACT
- SCHEMAV_MISC
- SCHEMAV_MISSING
- SCHEMAV_NOROLLBACK
- SCHEMAV_NOROOT
- SCHEMAV_NOTDETERMINIST
- SCHEMAV_NOTEMPTY
- SCHEMAV_NOTNILLABLE
- SCHEMAV_NOTSIMPLE
- SCHEMAV_NOTTOPLEVEL
- SCHEMAV_NOTYPE
- SCHEMAV_UNDECLAREDELEM
- SCHEMAV_VALUE
- SCHEMAV_WRONGELEM
- SEPARATOR_REQUIRED
- SPACE_REQUIRED
- STANDALONE_VALUE
- STRING_NOT_CLOSED
- STRING_NOT_STARTED
- TAG_NAME_MISMATCH
- TAG_NOT_FINISHED
- TREE
- TREE_INVALID_DEC
- TREE_INVALID_HEX
- TREE_NOT_UTF8
- TREE_UNTERMINATED_ENTITY
- UNDECLARED_ENTITY
- UNKNOWN_ENCODING
- UNPARSED_ENTITY
- UNSUPPORTED_ENCODING
- URI_FRAGMENT
- URI_REQUIRED
- VALID
- VALUE_REQUIRED
- VERBOSE_HANDLER
Verbose error handler
- VERSION_MISSING
- WARNING
- WAR_ENTITY_REDEFINED
- WAR_NS_COLUMN
- WRITER
- XINCLUDE
- XINCLUDE_BUILD_FAILED
- XINCLUDE_DEPRECATED_NS
- XINCLUDE_ENTITY_DEF_MISMATCH
- XINCLUDE_FALLBACKS_IN_INCLUDE
- XINCLUDE_FALLBACK_NOT_IN_INCLUDE
- XINCLUDE_FRAGMENT_ID
- XINCLUDE_HREF_URI
- XINCLUDE_INCLUDE_IN_INCLUDE
- XINCLUDE_INVALID_CHAR
- XINCLUDE_MULTIPLE_ROOT
- XINCLUDE_NO_FALLBACK
- XINCLUDE_NO_HREF
- XINCLUDE_PARSE_VALUE
- XINCLUDE_RECURSION
- XINCLUDE_TEXT_DOCUMENT
- XINCLUDE_TEXT_FRAGMENT
- XINCLUDE_UNKNOWN_ENCODING
- XINCLUDE_XPTR_FAILED
- XINCLUDE_XPTR_RESULT
- XMLDECL_NOT_FINISHED
- XMLDECL_NOT_STARTED
- XML_WAR_CATALOG_PI
- XML_WAR_LANG_VALUE
- XML_WAR_NS_URI
- XML_WAR_NS_URI_RELATIVE
- XML_WAR_SPACE_VALUE
- XML_WAR_UNDECLARED_ENTITY
- XML_WAR_UNKNOWN_VERSION
- XPATH
- XPATH_ENCODING_ERROR
- XPATH_EXPRESSION_OK
- XPATH_EXPR_ERROR
- XPATH_INVALID_ARITY
- XPATH_INVALID_CHAR_ERROR
- XPATH_INVALID_CTXT_POSITION
- XPATH_INVALID_CTXT_SIZE
- XPATH_INVALID_OPERAND
- XPATH_INVALID_PREDICATE_ERROR
- XPATH_INVALID_TYPE
- XPATH_MEMORY_ERROR
- XPATH_NUMBER_ERROR
- XPATH_START_LITERAL_ERROR
- XPATH_UNCLOSED_ERROR
- XPATH_UNDEF_PREFIX_ERROR
- XPATH_UNDEF_VARIABLE_ERROR
- XPATH_UNFINISHED_LITERAL_ERROR
- XPATH_UNKNOWN_FUNC_ERROR
- XPATH_VARIABLE_REF_ERROR
- XPOINTER
- XPTR_CHILDSEQ_START
- XPTR_EVAL_FAILED
- XPTR_EXTRA_OBJECTS
- XPTR_RESOURCE_ERROR
- XPTR_SUB_RESOURCE_ERROR
- XPTR_SYNTAX_ERROR
- XPTR_UNKNOWN_SCHEME
- XSLT
Attributes
Error
attributes
Public Class Methods
Returns the proc that will be called when libxml generates warning, error or fatal error messages.
static VALUE rxml_error_get_handler(VALUE self) { VALUE block = rb_cvar_get(eXMLError, ERROR_HANDLER_ID); return block; }
Removes the current error handler.
static VALUE rxml_error_reset_handler(VALUE self) { rxml_set_handler(self, Qnil); return self; }
Registers a block that will be called with an instance of XML::Error
when libxml generates warning, error or fatal error messages.
static VALUE rxml_error_set_handler(VALUE self) { VALUE block; if (rb_block_given_p() == Qfalse) rb_raise(rb_eRuntimeError, "No block given"); block = rb_block_proc(); /* Embed the block within the Error class to avoid it to be collected. Previous handler will be overwritten if it exists. */ rxml_set_handler(self, block); return self; }
Public Instance Methods
# File lib/libxml/error.rb 37 def ==(other) 38 eql?(other) 39 end
# File lib/libxml/error.rb 76 def code_to_s 77 ERROR_CODE_MAP[self.code].to_s 78 end
# File lib/libxml/error.rb 72 def domain_to_s 73 DOMAIN_CODE_MAP[self.domain].to_s 74 end
# File lib/libxml/error.rb 41 def eql?(other) 42 self.code == other.code and 43 self.domain == other.domain and 44 self.message == other.message and 45 self.level == other.level and 46 self.file == other.file and 47 self.line == other.line and 48 self.str1 == other.str1 and 49 self.str2 == other.str2 and 50 self.str3 == other.str3 and 51 self.int1 == other.int1 and 52 self.int2 == other.int2 and 53 self.ctxt == other.ctxt and 54 self.node == other.node 55 rescue 56 false 57 end
# File lib/libxml/error.rb 59 def level_to_s 60 case self.level 61 when NONE 62 '' 63 when WARNING 64 'Warning:' 65 when ERROR 66 'Error:' 67 when FATAL 68 'Fatal error:' 69 end 70 end
# File lib/libxml/error.rb 80 def to_s 81 msg = super 82 msg = msg ? msg.strip: '' 83 84 if self.line 85 sprintf("%s %s at %s:%d.", self.level_to_s, msg, 86 self.file, self.line) 87 else 88 sprintf("%s %s.", self.level_to_s, msg) 89 end 90 end