From 9cb5ff4e6a18f557a2332111686f0ca69cd43917 Mon Sep 17 00:00:00 2001
From: Daniel Veillard
It is possible to validate documents which had not been validated at initial parsing time or documents who have been built from scratch using the API. Use the xmlValidateDtd() + href="http://xmlsoft.org/html/libxml-valid.html#XMLVALIDATEDTD">xmlValidateDtd() function. It is also possible to simply add a Dtd to an existing document:
xmlDocPtr doc; /* your existing document */ diff --git a/doc/html/gnome-xml-error.html b/doc/html/gnome-xml-error.html deleted file mode 100644 index afb92b70..00000000 --- a/doc/html/gnome-xml-error.html +++ /dev/null @@ -1,390 +0,0 @@ -error error
Synopsis
- -void xmlParserError (xmlParserCtxtPtr ctxt, - const char *msg, - ...); -void xmlParserWarning (xmlParserCtxtPtr ctxt, - const char *msg, - ...);\ No newline at end of file diff --git a/doc/html/gnome-xml-xml-error.html b/doc/html/gnome-xml-xml-error.html deleted file mode 100644 index 30272fd6..00000000 --- a/doc/html/gnome-xml-xml-error.html +++ /dev/null @@ -1,977 +0,0 @@ -Details
xmlParserError()
void xmlParserError (xmlParserCtxtPtr ctxt, - const char *msg, - ...);Display and format an error messages, gives file, line, position and -extra parameters.
ctxt : an XML parser context msg : the message to display/transmit ... : extra parameters for the message display xmlParserWarning()
void xmlParserWarning (xmlParserCtxtPtr ctxt, - const char *msg, - ...);Display and format a warning messages, gives file, line, position and -extra parameters.
ctxt : an XML parser context msg : the message to display/transmit ... : extra parameters for the message display xml-error
Gnome XML Library Reference Manual <<< Previous Page Home Up Next Page >>> xml-error
Synopsis
- -enum xmlParserErrors; -void xmlParserError (void *ctx, - const char *msg, - ...); -void xmlParserWarning (void *ctx, - const char *msg, - ...); -void xmlParserValidityError (void *ctx, - const char *msg, - ...); -void xmlParserValidityWarning (void *ctx, - const char *msg, - ...); -void xmlParserPrintFileInfo (xmlParserInputPtr input); -void xmlParserPrintFileContext (xmlParserInputPtr input);\ No newline at end of file diff --git a/doc/html/gnome-xml-debugxml.html b/doc/html/libxml-debugxml.html similarity index 89% rename from doc/html/gnome-xml-debugxml.html rename to doc/html/libxml-debugxml.html index e8bd8044..aafcc767 100644 --- a/doc/html/gnome-xml-debugxml.html +++ b/doc/html/libxml-debugxml.html @@ -13,10 +13,10 @@ TITLE="Libxml Library Reference" HREF="libxml-lib.html">Details
enum xmlParserErrors
typedef enum { - XML_ERR_OK = 0, - XML_ERR_INTERNAL_ERROR, - XML_ERR_NO_MEMORY, - - XML_ERR_DOCUMENT_START, /* 3 */ - XML_ERR_DOCUMENT_EMPTY, - XML_ERR_DOCUMENT_END, - - XML_ERR_INVALID_HEX_CHARREF, /* 6 */ - XML_ERR_INVALID_DEC_CHARREF, - XML_ERR_INVALID_CHARREF, - XML_ERR_INVALID_CHAR, - - XML_ERR_CHARREF_AT_EOF, /* 10 */ - XML_ERR_CHARREF_IN_PROLOG, - XML_ERR_CHARREF_IN_EPILOG, - XML_ERR_CHARREF_IN_DTD, - XML_ERR_ENTITYREF_AT_EOF, - XML_ERR_ENTITYREF_IN_PROLOG, - XML_ERR_ENTITYREF_IN_EPILOG, - XML_ERR_ENTITYREF_IN_DTD, - XML_ERR_PEREF_AT_EOF, - XML_ERR_PEREF_IN_PROLOG, - XML_ERR_PEREF_IN_EPILOG, - XML_ERR_PEREF_IN_INT_SUBSET, - - XML_ERR_ENTITYREF_NO_NAME, /* 22 */ - XML_ERR_ENTITYREF_SEMICOL_MISSING, - - XML_ERR_PEREF_NO_NAME, /* 24 */ - XML_ERR_PEREF_SEMICOL_MISSING, - - XML_ERR_UNDECLARED_ENTITY, /* 26 */ - XML_WAR_UNDECLARED_ENTITY, - XML_ERR_UNPARSED_ENTITY, - XML_ERR_ENTITY_IS_EXTERNAL, - XML_ERR_ENTITY_IS_PARAMETER, - - XML_ERR_UNKNOWN_ENCODING, /* 31 */ - XML_ERR_UNSUPPORTED_ENCODING, - - XML_ERR_STRING_NOT_STARTED, /* 33 */ - XML_ERR_STRING_NOT_CLOSED, - XML_ERR_NS_DECL_ERROR, - - XML_ERR_ENTITY_NOT_STARTED, /* 36 */ - XML_ERR_ENTITY_NOT_FINISHED, - - XML_ERR_LT_IN_ATTRIBUTE, /* 38 */ - XML_ERR_ATTRIBUTE_NOT_STARTED, - XML_ERR_ATTRIBUTE_NOT_FINISHED, - XML_ERR_ATTRIBUTE_WITHOUT_VALUE, - XML_ERR_ATTRIBUTE_REDEFINED, - - XML_ERR_LITERAL_NOT_STARTED, /* 43 */ - XML_ERR_LITERAL_NOT_FINISHED, - - XML_ERR_COMMENT_NOT_FINISHED, /* 45 */ - - XML_ERR_PI_NOT_STARTED, /* 47 */ - XML_ERR_PI_NOT_FINISHED, - - XML_ERR_NOTATION_NOT_STARTED, /* 49 */ - XML_ERR_NOTATION_NOT_FINISHED, - - XML_ERR_ATTLIST_NOT_STARTED, /* 51 */ - XML_ERR_ATTLIST_NOT_FINISHED, - - XML_ERR_MIXED_NOT_STARTED, /* 53 */ - XML_ERR_MIXED_NOT_FINISHED, - - XML_ERR_ELEMCONTENT_NOT_STARTED, /* 55 */ - XML_ERR_ELEMCONTENT_NOT_FINISHED, - - XML_ERR_XMLDECL_NOT_STARTED, /* 57 */ - XML_ERR_XMLDECL_NOT_FINISHED, - - XML_ERR_CONDSEC_NOT_STARTED, /* 59 */ - XML_ERR_CONDSEC_NOT_FINISHED, - - XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 61 */ - - XML_ERR_DOCTYPE_NOT_FINISHED, /* 62 */ - - XML_ERR_MISPLACED_CDATA_END, /* 63 */ - XML_ERR_CDATA_NOT_FINISHED, - - XML_ERR_RESERVED_XML_NAME, /* 65 */ - - XML_ERR_SPACE_REQUIRED, /* 66 */ - XML_ERR_SEPARATOR_REQUIRED, - XML_ERR_NMTOKEN_REQUIRED, - XML_ERR_NAME_REQUIRED, - XML_ERR_PCDATA_REQUIRED, - XML_ERR_URI_REQUIRED, - XML_ERR_PUBID_REQUIRED, - XML_ERR_LT_REQUIRED, - XML_ERR_GT_REQUIRED, - XML_ERR_LTSLASH_REQUIRED, - XML_ERR_EQUAL_REQUIRED, - - XML_ERR_TAG_NAME_MISMATCH, /* 77 */ - XML_ERR_TAG_NOT_FINISED, - - XML_ERR_STANDALONE_VALUE, /* 79 */ - - XML_ERR_ENCODING_NAME, /* 80 */ - - XML_ERR_HYPHEN_IN_COMMENT, /* 81 */ - - XML_ERR_INVALID_ENCODING, /* 82 */ - - XML_ERR_EXT_ENTITY_STANDALONE, /* 83 */ - - XML_ERR_CONDSEC_INVALID, /* 84 */ - - XML_ERR_VALUE_REQUIRED, /* 85 */ - - XML_ERR_NOT_WELL_BALANCED, /* 86 */ - XML_ERR_EXTRA_CONTENT, /* 87 */ - XML_ERR_ENTITY_CHAR_ERROR, /* 88 */ - XML_ERR_ENTITY_PE_INTERNAL, /* 88 */ - XML_ERR_ENTITY_LOOP, /* 89 */ - XML_ERR_ENTITY_BOUNDARY, /* 90 */ - XML_ERR_INVALID_URI, /* 91 */ - XML_ERR_URI_FRAGMENT /* 92 */ -}xmlParserErrors;xmlParserError ()
void xmlParserError (void *ctx, - const char *msg, - ...);Display and format an error messages, gives file, line, position and -extra parameters.
ctx : msg : ... : xmlParserWarning ()
void xmlParserWarning (void *ctx, - const char *msg, - ...);Display and format a warning messages, gives file, line, position and -extra parameters.
ctx : msg : ... : xmlParserValidityError ()
void xmlParserValidityError (void *ctx, - const char *msg, - ...);Display and format an validity error messages, gives file, -line, position and extra parameters.
ctx : msg : ... : xmlParserValidityWarning ()
void xmlParserValidityWarning (void *ctx, - const char *msg, - ...);Display and format a validity warning messages, gives file, line, -position and extra parameters.
ctx : msg : ... : xmlParserPrintFileInfo ()
void xmlParserPrintFileInfo (xmlParserInputPtr input);Displays the associated file and line informations for the current input
input : xmlParserPrintFileContext ()
void xmlParserPrintFileContext (xmlParserInputPtr input);Displays current context within the input content for error tracking
input : debugXML
Name
Synopsis
void xmlDebugDumpString (FILE *output, const xmlChar *str); void xmlDebugDumpAttr (FILE *output, xmlAttrPtr attr, int depth); void xmlDebugDumpAttrList (FILE *output, xmlAttrPtr attr, int depth); void xmlDebugDumpOneNode (FILE *output, xmlNodePtr node, int depth); void xmlDebugDumpNode (FILE *output, xmlNodePtr node, int depth); void xmlDebugDumpNodeList (FILE *output, xmlNodePtr node, int depth); void xmlDebugDumpDocumentHead (FILE *output, xmlDocPtr doc); void xmlDebugDumpDocument (FILE *output, xmlDocPtr doc); void xmlDebugDumpDTD (FILE *output, xmlDtdPtr doc); void xmlDebugDumpEntities (FILE *output, xmlDocPtr doc); void xmlLsOneNode (FILE *output, xmlNodePtr node); char* (*xmlShellReadlineFunc) (char *prompt); struct xmlShellCtxt; typedef xmlShellCtxtPtr; int (*xmlShellCmd) (xmlShellCtxtPtr ctxt, char *arg, xmlNodePtr node, xmlNodePtr node2); void xmlShell (xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,Description
Details
FILE *output, const xmlChar *str);
FILE *output, xmlAttrPtr attr, int depth);
FILE *output, xmlAttrPtr attr, int depth);
FILE *output, xmlNodePtr node, int depth);
FILE *output, xmlNodePtr node, int depth);
FILE *output, xmlNodePtr node, int depth);
FILE *output, xmlDocPtr doc);
FILE *output, xmlDocPtr doc);
FILE *output, xmlDtdPtr doc);
FILE *output, xmlDocPtr doc);
FILE *output, xmlNodePtr node);
int (*xmlShellCmd) (xmlShellCtxtPtr ctxt, char *arg, xmlNodePtr node, xmlNodePtr node2);encoding
Name
Synopsis
enum xmlCharEncoding; int (*xmlCharEncodingInputFunc) (unsigned char *out, int *outlen, unsigned char *in, int *inlen); int (*xmlCharEncodingOutputFunc) (unsigned char *out, int *outlen, unsigned char *in, int *inlen); struct xmlCharEncodingHandler; typedef xmlCharEncodingHandlerPtr; void xmlInitCharEncodingHandlers (void); void xmlCleanupCharEncodingHandlers (void); void xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler); xmlCharEncodingHandlerPtr xmlGetCharEncodingHandler (xmlCharEncoding enc); xmlCharEncodingHandlerPtr xmlFindCharEncodingHandler (const char *name); int xmlAddEncodingAlias (const char *name, const char *alias); int xmlDelEncodingAlias (const char *alias); const char* xmlGetEncodingAlias (const char *alias); void xmlCleanupEncodingAliases (void); xmlCharEncoding xmlParseCharEncoding (const char *name); const char* xmlGetCharEncodingName (xmlCharEncoding enc); xmlCharEncoding xmlDetectCharEncoding (unsigned char *in, int len); int xmlCheckUTF8 (unsigned char *utf); int xmlCharEncOutFunc (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in); int xmlCharEncInFunc (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in); int xmlCharEncFirstLine (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in); int xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);Description
Details
void xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
xmlCharEncodingHandlerPtr xmlGetCharEncodingHandler (xmlCharEncoding enc);
xmlCharEncodingHandlerPtr xmlFindCharEncodingHandler (const char *name);
xmlCharEncoding xmlParseCharEncoding (const char *name);
const char* xmlGetCharEncodingName (xmlCharEncoding enc);
xmlCharEncoding xmlDetectCharEncoding (unsigned char *in, int len);
int xmlCharEncOutFunc (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in);
int xmlCharEncInFunc (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in);
int xmlCharEncFirstLine (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in);entities
Name
Synopsis
enum xmlEntityType; struct xmlEntity; typedef xmlEntityPtr; typedef xmlEntitiesTablePtr; void xmlInitializePredefinedEntities (void); xmlEntityPtr xmlAddDocEntity (xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content); xmlEntityPtr xmlAddDtdEntity (xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content); xmlEntityPtr xmlGetPredefinedEntity (const xmlChar *name); xmlEntityPtr xmlGetDocEntity (xmlDocPtr doc, const xmlChar *name); xmlEntityPtr xmlGetDtdEntity (xmlDocPtr doc, const xmlChar *name); xmlEntityPtr xmlGetParameterEntity (xmlDocPtr doc, const xmlChar *name); const xmlChar* xmlEncodeEntities (xmlDocPtr doc, const xmlChar *input); xmlChar* xmlEncodeEntitiesReentrant (xmlDocPtr doc, const xmlChar *input); xmlChar* xmlEncodeSpecialChars (xmlDocPtr doc, const xmlChar *input); xmlEntitiesTablePtr xmlCreateEntitiesTable (void); xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table); void xmlFreeEntitiesTable (xmlEntitiesTablePtr table); void xmlDumpEntitiesTable (xmlBufferPtr buf, xmlEntitiesTablePtr table); void xmlDumpEntityDecl (xmlBufferPtr buf, xmlEntityPtr ent); void xmlCleanupPredefinedEntities (void);Description
Details
xmlEntityPtr xmlAddDocEntity (xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content);
xmlEntityPtr xmlAddDtdEntity (xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content);
xmlEntityPtr xmlGetPredefinedEntity (const xmlChar *name);
xmlEntityPtr xmlGetDocEntity (xmlDocPtr doc, const xmlChar *name);
xmlEntityPtr xmlGetDtdEntity (xmlDocPtr doc, const xmlChar *name);
xmlEntityPtr xmlGetParameterEntity (xmlDocPtr doc, const xmlChar *name);
const xmlChar* xmlEncodeEntities (xmlDocPtr doc, const xmlChar *input);
xmlChar* xmlEncodeEntitiesReentrant (xmlDocPtr doc, const xmlChar *input);
xmlChar* xmlEncodeSpecialChars (xmlDocPtr doc, const xmlChar *input);
xmlEntitiesTablePtr xmlCreateEntitiesTable (void);
xmlEntitiesTablePtr xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
void xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
void xmlDumpEntitiesTable (xmlBufferPtr buf, xmlEntitiesTablePtr table);
void xmlDumpEntityDecl (xmlBufferPtr buf, xmlEntityPtr ent);HTMLparser
Name
Synopsis
typedef htmlParserCtxt; typedef htmlParserCtxtPtr; typedef htmlParserNodeInfo; typedef htmlSAXHandler; typedef htmlSAXHandlerPtr; typedef htmlParserInput; typedef htmlParserInputPtr; typedef htmlDocPtr; typedef htmlNodePtr; struct htmlElemDesc; typedef htmlElemDescPtr; struct htmlEntityDesc; typedef htmlEntityDescPtr; htmlElemDescPtr htmlTagLookup (const xmlChar *tag); htmlEntityDescPtr htmlEntityLookup (const xmlChar *name); htmlEntityDescPtr htmlEntityValueLookup (int value); int htmlIsAutoClosed (htmlDocPtr doc, htmlNodePtr elem); int htmlAutoCloseTag (htmlDocPtr doc, const xmlChar *name, htmlNodePtr elem); htmlEntityDescPtr htmlParseEntityRef (htmlParserCtxtPtr ctxt, xmlChar **str); int htmlParseCharRef (htmlParserCtxtPtr ctxt); void htmlParseElement (htmlParserCtxtPtr ctxt); htmlDocPtr htmlSAXParseDoc (xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void *userData); htmlDocPtr htmlParseDoc (xmlChar *cur, const char *encoding); htmlDocPtr htmlSAXParseFile (const char *filename, const char *encoding, htmlSAXHandlerPtr sax, void *userData); htmlDocPtr htmlParseFile (const char *filename, const char *encoding); int UTF8ToHtml (unsigned char *out, int *outlen, unsigned char *in, int *inlen); int htmlEncodeEntities (unsigned char *out, int *outlen, @@ -341,31 +341,31 @@ HREF="gnome-xml-htmlparser.html#HTMLENCODEENTITIES" int *inlen, int quoteChar); int htmlIsScriptAttribute (const xmlChar *name); int htmlHandleOmittedElem (int val); void htmlFreeParserCtxt (htmlParserCtxtPtr ctxt); htmlParserCtxtPtr htmlCreatePushParserCtxt (htmlSAXHandlerPtr sax, void *user_data, @@ -373,14 +373,14 @@ HREF="gnome-xml-htmlparser.html#HTMLSAXHANDLERPTR" int size, const char *filename, xmlCharEncoding enc); int htmlParseChunk (htmlParserCtxtPtr ctxt, const char *chunk, @@ -393,7 +393,7 @@ HREF="gnome-xml-htmlparser.html#HTMLPARSERCTXTPTR" >Description
Details
htmlElemDescPtr htmlTagLookup (const xmlChar *tag);
htmlEntityDescPtr htmlEntityLookup (const xmlChar *name);
htmlEntityDescPtr htmlEntityValueLookup (int value);
int htmlIsAutoClosed (htmlDocPtr doc, htmlNodePtr elem);
int htmlAutoCloseTag (htmlDocPtr doc, const xmlChar *name, htmlNodePtr elem);