|
ReactOS 0.4.16-dev-2132-g3885311
|
#include <libxml/xmlversion.h>#include <libxml/tree.h>#include <libxml/dict.h>#include <libxml/hash.h>#include <libxml/valid.h>#include <libxml/entities.h>#include <libxml/xmlerror.h>#include <libxml/xmlstring.h>#include <libxml/xmlmemory.h>#include <libxml/encoding.h>#include <libxml/xmlIO.h>#include <libxml/SAX2.h>#include <libxml/threads.h>
Go to the source code of this file.
Classes | |
| struct | _xmlParserInput |
| struct | _xmlParserNodeInfo |
| struct | _xmlParserNodeInfoSeq |
| struct | _xmlParserCtxt |
| struct | _xmlSAXLocator |
| struct | _xmlSAXHandler |
| struct | _xmlSAXHandlerV1 |
Macros | |
| #define | XML_TREE_INTERNALS |
| #define | XML_DEFAULT_VERSION "1.0" |
| #define | XML_DETECT_IDS 2 |
| #define | XML_COMPLETE_ATTRS 4 |
| #define | XML_SKIP_IDS 8 |
Typedefs | |
| typedef void(* | xmlParserInputDeallocate) (xmlChar *str) |
| typedef struct _xmlParserNodeInfo | xmlParserNodeInfo |
| typedef xmlParserNodeInfo * | xmlParserNodeInfoPtr |
| typedef struct _xmlParserNodeInfoSeq | xmlParserNodeInfoSeq |
| typedef xmlParserNodeInfoSeq * | xmlParserNodeInfoSeqPtr |
| typedef struct _xmlStartTag | xmlStartTag |
| typedef struct _xmlParserNsData | xmlParserNsData |
| typedef struct _xmlAttrHashBucket | xmlAttrHashBucket |
| typedef xmlParserInputPtr(* | resolveEntitySAXFunc) (void *ctx, const xmlChar *publicId, const xmlChar *systemId) |
: the root element name | |
externalSubsetSAXFunc: @ctx: the user data (XML parser context) @ExternalID: the external ID @SystemID: the SYSTEM ID (e.g. filename or URL) Callback on external subset declaration. | |
| typedef void(* | internalSubsetSAXFunc) (void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) |
| typedef void(* | externalSubsetSAXFunc) (void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) |
: The entity name | |
getParameterEntitySAXFunc: @ctx: the user data (XML parser context) Get a parameter entity by name. Returns the xmlEntityPtr if found. | |
| typedef xmlEntityPtr(* | getEntitySAXFunc) (void *ctx, const xmlChar *name) |
| typedef xmlEntityPtr(* | getParameterEntitySAXFunc) (void *ctx, const xmlChar *name) |
: The name of the notation | |
notationDeclSAXFunc: @ctx: the user data (XML parser context) @publicId: The public ID of the entity @systemId: The system ID of the entity What to do when a notation declaration has been parsed. | |
| typedef void(* | notationDeclSAXFunc) (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId) |
| typedef void(* | attributeDeclSAXFunc) (void *ctx, const xmlChar *elem, const xmlChar *fullname, int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree) |
: the element name | |
endElementSAXFunc: @ctx: the user data (XML parser context) Called when the end of an element has been detected. | |
| typedef void(* | elementDeclSAXFunc) (void *ctx, const xmlChar *name, int type, xmlElementContentPtr content) |
| typedef void(* | endElementSAXFunc) (void *ctx, const xmlChar *name) |
: The name of the entity | |
unparsedEntityDeclSAXFunc: @ctx: the user data (XML parser context) @publicId: The public ID of the entity @systemId: The system ID of the entity @notationName: the name of the notation What to do when an unparsed entity declaration is parsed. | |
| typedef void(* | unparsedEntityDeclSAXFunc) (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName) |
| typedef void(* | setDocumentLocatorSAXFunc) (void *ctx, xmlSAXLocatorPtr loc) |
| typedef void(* | startDocumentSAXFunc) (void *ctx) |
| typedef void(* | endDocumentSAXFunc) (void *ctx) |
: The element name, including namespace prefix | |
startElementSAXFunc: @ctx: the user data (XML parser context) @atts: An array of name/value attributes pairs, NULL terminated Called when an opening tag has been processed. | |
| typedef void(* | startElementSAXFunc) (void *ctx, const xmlChar *name, const xmlChar **atts) |
: The attribute name, including namespace prefix | |
attributeSAXFunc: @ctx: the user data (XML parser context) @value: The attribute value Handle an attribute that has been read by the parser. The default handling is to convert the attribute into an DOM subtree and past it in a new xmlAttr element added to the element. | |
| typedef void(* | attributeSAXFunc) (void *ctx, const xmlChar *name, const xmlChar *value) |
Enumerations | |
| enum | xmlParserInputState { XML_PARSER_EOF = -1 , XML_PARSER_START = 0 , XML_PARSER_MISC , XML_PARSER_PI , XML_PARSER_DTD , XML_PARSER_PROLOG , XML_PARSER_COMMENT , XML_PARSER_START_TAG , XML_PARSER_CONTENT , XML_PARSER_CDATA_SECTION , XML_PARSER_END_TAG , XML_PARSER_ENTITY_DECL , XML_PARSER_ENTITY_VALUE , XML_PARSER_ATTRIBUTE_VALUE , XML_PARSER_SYSTEM_LITERAL , XML_PARSER_EPILOG , XML_PARSER_IGNORE , XML_PARSER_PUBLIC_LITERAL , XML_PARSER_XML_DECL } |
| enum | xmlParserMode { XML_PARSE_UNKNOWN = 0 , XML_PARSE_DOM = 1 , XML_PARSE_SAX = 2 , XML_PARSE_PUSH_DOM = 3 , XML_PARSE_PUSH_SAX = 4 , XML_PARSE_READER = 5 } |
| #define XML_COMPLETE_ATTRS 4 |
| #define XML_DEFAULT_VERSION "1.0" |
| #define XML_DETECT_IDS 2 |
| #define XML_GLOBALS_PARSER |
| #define XML_GLOBALS_PARSER_CORE |
DOC_DISABLE
| #define XML_OP XML_DECLARE_GLOBAL |
| #define XML_SAX2_MAGIC 0xDEEDBEAF |
| #define XML_SKIP_IDS 8 |
| typedef void(* endElementNsSAX2Func) (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI) |
endElementNsSAX2Func: @ctx: the user data (XML parser context) @localname: the local name of the element @prefix: the element namespace prefix if available @URI: the element namespace name if available
SAX2 callback when an element end has been detected by the parser. It provides the namespace information for the element.
| typedef void(*) typedef void(*) typedef void(* fatalErrorSAXFunc) (void *ctx, const char *msg,...) LIBXML_ATTR_FORMAT(2 |
fatalErrorSAXFunc: @ctx: an XML parser context @msg: the message to display/transmit ...: extra parameters for the message display
Display and format fatal error messages, callback. Note: so far fatalError() SAX callbacks are not used, error() get all the callbacks for errors.
| typedef xmlParserInputPtr(* resolveEntitySAXFunc) (void *ctx, const xmlChar *publicId, const xmlChar *systemId) |
xmlSAXHandler:
A SAX handler is bunch of callbacks called by the parser when processing of the input generate data or structure information. resolveEntitySAXFunc: @ctx: the user data (XML parser context) @publicId: The public ID of the entity @systemId: The system ID of the entity
Callback: The entity loader, to control the loading of external entities, the application can either:
Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
| typedef void(* startElementNsSAX2Func) (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI, int nb_namespaces, const xmlChar **namespaces, int nb_attributes, int nb_defaulted, const xmlChar **attributes) |
startElementNsSAX2Func: @ctx: the user data (XML parser context) @localname: the local name of the element @prefix: the element namespace prefix if available @URI: the element namespace name if available @nb_namespaces: number of namespace definitions on that node @namespaces: pointer to the array of prefix/URI pairs namespace definitions @nb_attributes: the number of attributes on that node @nb_defaulted: the number of defaulted attributes. The defaulted ones are at the end of the array @attributes: pointer to the array of (localname/prefix/URI/value/end) attribute values.
SAX2 callback when an element start has been detected by the parser. It provides the namespace information for the element, as well as the new namespace declarations on the element.
xmlParserInput:
An xmlParserInput is an input flow for the XML processor. Each entity parsed is associated an xmlParserInput (except the few predefined ones). This is the case both for internal entities
Callback for freeing some parser input allocations.
| typedef xmlParserNodeInfo* xmlParserNodeInfoPtr |
| typedef struct _xmlParserNsData xmlParserNsData |
| typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1 |
| typedef xmlSAXHandlerV1* xmlSAXHandlerV1Ptr |
| typedef struct _xmlStartTag xmlStartTag |
xmlFeature:
Used to examine the existence of features that can be enabled or disabled at compile-time. They used to be called XML_FEATURE_xxx but this clashed with Expat
Definition at line 1341 of file parser.h.
xmlParserInputState:
The parser is now working also as a state based parser. The recursive one use the state info for entities processing.
Definition at line 115 of file parser.h.
xmlParserMode:
A parser can operate in various modes
| Enumerator | |
|---|---|
| XML_PARSE_UNKNOWN | |
| XML_PARSE_DOM | |
| XML_PARSE_SAX | |
| XML_PARSE_PUSH_DOM | |
| XML_PARSE_PUSH_SAX | |
| XML_PARSE_READER | |
Definition at line 167 of file parser.h.
xmlParserOption:
This is the set of XML parser options that can be passed down to the xmlReadDoc() and similar calls.
Definition at line 1229 of file parser.h.
| XML_DEPRECATED XMLPUBFUN void xmlCleanupGlobals | ( | void | ) |
xmlCleanupGlobals:
DEPRECATED: This function is a no-op. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all.
Definition at line 609 of file globals.c.
xmlCleanupParser:
This function name is somewhat misleading. It does not clean up parser state, it cleans up memory allocated by the library itself. It is a cleanup function for the XML library. It tries to reclaim all related global memory allocated for the library processing. It doesn't deallocate any document related memory. One should call xmlCleanupParser() only when the process has finished using the library and all XML/HTML documents built with it. See also xmlInitParser() which has the opposite function of preparing the library for operations.
WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !
Definition at line 630 of file threads.c.
Referenced by DllMain(), and xmlInitParser().
| XMLPUBFUN void xmlClearNodeInfoSeq | ( | xmlParserNodeInfoSeqPtr | seq | ) |
xmlClearNodeInfoSeq: @seq: a node info sequence pointer
DEPRECATED: Don't use.
– Clear (release memory and reinitialize) node info sequence
Definition at line 2210 of file parserInternals.c.
Referenced by xmlClearParserCtxt().
xmlClearParserCtxt: @ctxt: an XML parser context
Clear (release owned resources) and reinitialize a parser context
Definition at line 2145 of file parserInternals.c.
xmlCreateDocParserCtxt: @str: a pointer to an array of xmlChar
Creates a parser context for an XML in-memory document.
Returns the new parser context or NULL
Definition at line 14207 of file parser.c.
Referenced by xmlParseBalancedChunkMemoryInternal(), and xmlReadDoc().
| XMLPUBFUN xmlParserCtxtPtr xmlCreateIOParserCtxt | ( | xmlSAXHandlerPtr | sax, |
| void * | user_data, | ||
| xmlInputReadCallback | ioread, | ||
| xmlInputCloseCallback | ioclose, | ||
| void * | ioctx, | ||
| xmlCharEncoding | enc | ||
| ) |
xmlCreateIOParserCtxt: @sax: a SAX handler @user_data: The user data returned on SAX callbacks @ioread: an I/O read function @ioclose: an I/O close function @ioctx: an I/O handler @enc: the charset encoding if known
Create a parser context for using the XML parser with an existing I/O stream
Returns the new parser context or NULL
Definition at line 12333 of file parser.c.
| XMLPUBFUN xmlDocPtr xmlCtxtReadDoc | ( | xmlParserCtxtPtr | ctxt, |
| const xmlChar * | str, | ||
| const char * | URL, | ||
| const char * | encoding, | ||
| int | options | ||
| ) |
xmlCtxtReadDoc: @ctxt: an XML parser context @str: a pointer to a zero terminated string @URL: the base URL to use for the document @encoding: the document encoding, or NULL @options: a combination of xmlParserOption
parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context
Returns the resulting document tree
Definition at line 14950 of file parser.c.
| XMLPUBFUN xmlDocPtr xmlCtxtReadFd | ( | xmlParserCtxtPtr | ctxt, |
| int | fd, | ||
| const char * | URL, | ||
| const char * | encoding, | ||
| int | options | ||
| ) |
xmlCtxtReadFd: @ctxt: an XML parser context @fd: an open file descriptor @URL: the base URL to use for the document @encoding: the document encoding, or NULL @options: a combination of xmlParserOption
parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context NOTE that the file descriptor will not be closed when the reader is closed or reset.
Returns the resulting document tree
Definition at line 15074 of file parser.c.
| XMLPUBFUN xmlDocPtr xmlCtxtReadFile | ( | xmlParserCtxtPtr | ctxt, |
| const char * | filename, | ||
| const char * | encoding, | ||
| int | options | ||
| ) |
xmlCtxtReadFile: @ctxt: an XML parser context @filename: a file or URL @encoding: the document encoding, or NULL @options: a combination of xmlParserOption
parse an XML file from the filesystem or the network. This reuses the existing @ctxt parser context
Returns the resulting document tree
Definition at line 14992 of file parser.c.
| XMLPUBFUN xmlDocPtr xmlCtxtReadIO | ( | xmlParserCtxtPtr | ctxt, |
| xmlInputReadCallback | ioread, | ||
| xmlInputCloseCallback | ioclose, | ||
| void * | ioctx, | ||
| const char * | URL, | ||
| const char * | encoding, | ||
| int | options | ||
| ) |
xmlCtxtReadIO: @ctxt: an XML parser context @ioread: an I/O read function @ioclose: an I/O close function @ioctx: an I/O handler @URL: the base URL to use for the document @encoding: the document encoding, or NULL @options: a combination of xmlParserOption
parse an XML document from I/O functions and source and build a tree. This reuses the existing @ctxt parser context
Returns the resulting document tree
Definition at line 15118 of file parser.c.
| XMLPUBFUN xmlDocPtr xmlCtxtReadMemory | ( | xmlParserCtxtPtr | ctxt, |
| const char * | buffer, | ||
| int | size, | ||
| const char * | URL, | ||
| const char * | encoding, | ||
| int | options | ||
| ) |
xmlCtxtReadMemory: @ctxt: an XML parser context @buffer: a pointer to a char array @size: the size of the array @URL: the base URL to use for the document @encoding: the document encoding, or NULL @options: a combination of xmlParserOption
parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context
Returns the resulting document tree
Definition at line 15028 of file parser.c.
xmlCtxtReset: @ctxt: an XML parser context
Reset a parser context
Definition at line 14372 of file parser.c.
Referenced by xmlClearParserCtxt(), xmlCtxtReadDoc(), xmlCtxtReadFd(), xmlCtxtReadFile(), xmlCtxtReadIO(), xmlCtxtReadMemory(), and xmlCtxtResetPush().
| XMLPUBFUN int xmlCtxtResetPush | ( | xmlParserCtxtPtr | ctxt, |
| const char * | chunk, | ||
| int | size, | ||
| const char * | filename, | ||
| const char * | encoding | ||
| ) |
xmlCtxtResetPush: @ctxt: an XML parser context @chunk: a pointer to an array of chars @size: number of chars in the array @filename: an optional file name or URI @encoding: the document encoding, or NULL
Reset a push parser context
Returns 0 in case of success and 1 in case of error
Definition at line 14480 of file parser.c.
xmlCtxtSetMaxAmplification: @ctxt: an XML parser context @maxAmpl: maximum amplification factor
To protect against exponential entity expansion ("billion laughs"), the size of serialized output is (roughly) limited to the input size multiplied by this factor. The default value is 5.
When working with documents making heavy use of entity expansion, it can be necessary to increase the value. For security reasons, this should only be considered when processing trusted input.
Definition at line 14717 of file parser.c.
xmlCtxtUseOptions: @ctxt: an XML parser context @options: a combination of xmlParserOption
Applies the options to the parser context
Returns 0 in case of success, the set of unknown or unimplemented options in case of error.
Definition at line 14698 of file parser.c.
Referenced by xslt_doc_default_loader(), and xsltDocDefaultLoaderFunc().
xmlFreeParserCtxt: @ctxt: an XML parser context
Free all the memory used by a parser context. However the parsed document in ctxt->myDoc is not freed.
Definition at line 2009 of file parserInternals.c.
Referenced by doparse(), internal_parseBuffer(), internal_parseStream(), xmlCreateDocParserCtxt(), xmlCreateEntityParserCtxtInternal(), xmlCreateIOParserCtxt(), xmlCreateMemoryParserCtxt(), xmlCreateURLParserCtxt(), xmlDoRead(), xmlNewSAXParserCtxt(), xmlParseBalancedChunkMemoryInternal(), xmlParseExternalEntityPrivate(), xmlParseInNodeContext(), xmlReadFd(), xmlReadIO(), xslt_doc_default_loader(), and xsltDocDefaultLoaderFunc().
| XMLPUBFUN xmlExternalEntityLoader xmlGetExternalEntityLoader | ( | void | ) |
Referenced by link_datatypes(), and schemasInit().
| XMLPUBFUN int xmlHasFeature | ( | xmlFeature | feature | ) |
xmlHasFeature: @feature: the feature to be examined
Examines if the library has been compiled with a given feature.
Returns a non-zero value if the feature exist, otherwise zero. Returns zero (0) if the feature does not exist or an unknown unknown feature is requested, non-zero otherwise.
Definition at line 640 of file parser.c.
| XML_DEPRECATED XMLPUBFUN void xmlInitGlobals | ( | void | ) |
xmlInitGlobals:
DEPRECATED: Alias for xmlInitParser.
| XMLPUBFUN void xmlInitNodeInfoSeq | ( | xmlParserNodeInfoSeqPtr | seq | ) |
xmlInitNodeInfoSeq: @seq: a node info sequence pointer
DEPRECATED: Don't use.
– Initialize (set to initial state) node info sequence
Definition at line 2191 of file parserInternals.c.
Referenced by xmlClearNodeInfoSeq(), xmlCtxtReset(), and xmlInitSAXParserCtxt().
| XML_GLOBALS_PARSER XMLPUBFUN void xmlInitParser | ( | void | ) |
DOC_ENABLE
xmlInitParser:
Initialization function for the XML parser.
Call once from the main thread before using the library in multithreaded programs.
Definition at line 569 of file threads.c.
Referenced by DllMain(), xmlCheckVersion(), xmlCtxtReadDoc(), xmlCtxtReadFd(), xmlCtxtReadFile(), xmlCtxtReadIO(), xmlCtxtReadMemory(), xmlDictCreate(), xmlHashCreate(), xmlInitCharEncodingHandlers(), xmlInitGlobals(), xmlInitializeDict(), xmlInitMemory(), xmlInitSAXParserCtxt(), xmlInitThreads(), xmlIsMainThreadInternal(), xmlMallocAtomicLoc(), xmlMallocLoc(), xmlMemStrdupLoc(), xmlParseDocument(), xmlReadDoc(), xmlReadFd(), xmlReadFile(), xmlReadIO(), xmlReadMemory(), and xmlReallocLoc().
xmlInitParserCtxt: @ctxt: an XML parser context
DEPRECATED: Internal function which will be made private in a future version.
Initialize a parser context
Returns 0 in case of success and -1 in case of error
Definition at line 1995 of file parserInternals.c.
| XML_DEPRECATED XMLPUBFUN int xmlKeepBlanksDefault | ( | int | val | ) |
xmlKeepBlanksDefault: @val: int 0 or 1
DEPRECATED: Use the modern options API with XML_PARSE_NOBLANKS.
Set and return the previous value for default blanks text nodes support. The 1.x version of the parser used an heuristic to try to detect ignorable white spaces. As a result the SAX callback was generating xmlSAX2IgnorableWhitespace() callbacks instead of characters() one, and when using the DOM output text nodes containing those blanks were not generated. The 2.x and later version will switch to the XML standard way and ignorableWhitespace() are only generated when running the parser in validating mode and when the current element doesn't allow CDATA or mixed content. This function is provided as a way to force the standard behavior on 1.X libs and to switch back to the old mode for compatibility when running 1.X client code on 2.X . Upgrade of 1.X code should be done by using xmlIsBlankNode() commodity function to detect the "empty" nodes generated. This value also affect autogeneration of indentation when saving code if blanks sections are kept, indentation is not generated.
Returns the last value for 0 for no substitution, 1 for substitution.
Definition at line 2426 of file parserInternals.c.
| XML_DEPRECATED XMLPUBFUN int xmlLineNumbersDefault | ( | int | val | ) |
xmlLineNumbersDefault: @val: int 0 or 1
DEPRECATED: The modern options API always enables line numbers.
Set and return the previous value for enabling line numbers in elements contents. This may break on old application and is turned off by default.
Returns the last value for 0 for no substitution, 1 for substitution.
Definition at line 2368 of file parserInternals.c.
| XMLPUBFUN xmlParserInputPtr xmlNewIOInputStream | ( | xmlParserCtxtPtr | ctxt, |
| xmlParserInputBufferPtr | input, | ||
| xmlCharEncoding | enc | ||
| ) |
xmlNewIOInputStream: @ctxt: an XML parser context @input: an I/O Input @enc: the charset encoding if known
Create a new input stream structure encapsulating the @input into a stream suitable for the parser.
Returns the new input stream or NULL
Definition at line 1581 of file parserInternals.c.
Referenced by import_loader_onDataAvailable(), xmlCreateIOParserCtxt(), xmlCtxtReadDoc(), xmlCtxtReadFd(), xmlCtxtReadIO(), xmlCtxtReadMemory(), xmlReadFd(), and xmlReadIO().
xmlNewParserCtxt:
Allocate and initialize a new parser context.
Returns the xmlParserCtxtPtr or NULL
Definition at line 2097 of file parserInternals.c.
Referenced by xmlCreateDocParserCtxt(), xmlCreateMemoryParserCtxt(), xmlCreateURLParserCtxt(), xmlReadFd(), xmlReadIO(), xslt_doc_default_loader(), and xsltDocDefaultLoaderFunc().
xmlNewSAXParserCtxt: @sax: SAX handler @userData: user data
Allocate and initialize a new SAX parser context. If userData is NULL, the parser context will be passed as user data.
Returns the xmlParserCtxtPtr or NULL if memory allocation failed.
Definition at line 2114 of file parserInternals.c.
Referenced by xmlCreateEntityParserCtxtInternal(), xmlCreateIOParserCtxt(), and xmlNewParserCtxt().
| XMLPUBFUN int xmlParseCtxtExternalEntity | ( | xmlParserCtxtPtr | ctx, |
| const xmlChar * | URL, | ||
| const xmlChar * | ID, | ||
| xmlNodePtr * | lst | ||
| ) |
xmlParseCtxtExternalEntity: @ctx: the existing parsing context @URL: the URL for the entity to load @ID: the System ID for the entity to load @lst: the return value for the set of parsed nodes
Parse an external general entity within an existing parsing context An external general parsed entity is well-formed if it matches the production labeled extParsedEnt.
[78] extParsedEnt ::= TextDecl? content
Returns 0 if the entity is well formed, -1 in case of args problem and the parser error code otherwise
Definition at line 12621 of file parser.c.
xmlParseDocument: @ctxt: an XML parser context
parse an XML document (and build a tree if using the standard SAX interface).
[1] document ::= prolog element Misc*
[22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)?
Returns 0, -1 in case of error. the parser context is augmented as a result of the parsing.
Definition at line 11009 of file parser.c.
Referenced by doparse(), internal_parseBuffer(), xmlDoRead(), xslt_doc_default_loader(), and xsltDocDefaultLoaderFunc().
xmlParseExtParsedEnt: @ctxt: an XML parser context
parse a general parsed entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt.
[78] extParsedEnt ::= TextDecl? content
Returns 0, -1 in case of error. the parser context is augmented as a result of the parsing.
Definition at line 11179 of file parser.c.
| XMLPUBFUN xmlParserErrors xmlParseInNodeContext | ( | xmlNodePtr | node, |
| const char * | data, | ||
| int | datalen, | ||
| int | options, | ||
| xmlNodePtr * | lst | ||
| ) |
xmlParseInNodeContext: @node: the context node @data: the input string @datalen: the input string length in bytes @options: a combination of xmlParserOption @lst: the return value for the set of parsed nodes
Parse a well-balanced chunk of an XML document within the context (DTD, namespaces, etc ...) of the given node.
The allowed sequence for the data is a Well Balanced Chunk defined by the content production in the XML grammar:
[43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*
Returns XML_ERR_OK if the chunk is well balanced, and the parser error code otherwise
Definition at line 13156 of file parser.c.
| XMLPUBFUN void xmlParserAddNodeInfo | ( | xmlParserCtxtPtr | ctxt, |
| const xmlParserNodeInfoPtr | info | ||
| ) |
xmlParserAddNodeInfo: @ctxt: an XML parser context @info: a node info sequence pointer
DEPRECATED: Don't use.
Insert node info record into the sorted sequence
Definition at line 2273 of file parserInternals.c.
Referenced by xmlParseElementStart().
| XMLPUBFUN const xmlParserNodeInfo * xmlParserFindNodeInfo | ( | const xmlParserCtxtPtr | ctx, |
| const xmlNodePtr | node | ||
| ) |
xmlParserFindNodeInfo: @ctx: an XML parser context @node: an XML node within the tree
DEPRECATED: Don't use.
Find the parser node info struct for a given node
Returns an xmlParserNodeInfo block pointer or NULL
Definition at line 2166 of file parserInternals.c.
Referenced by xmlParseElementEnd().
| XMLPUBFUN unsigned long xmlParserFindNodeInfoIndex | ( | const xmlParserNodeInfoSeqPtr | seq, |
| const xmlNodePtr | node | ||
| ) |
xmlParserFindNodeInfoIndex: @seq: a node info sequence pointer @node: an XML node pointer
DEPRECATED: Don't use.
xmlParserFindNodeInfoIndex : Find the index that the info record for the given node is or should be at in a sorted sequence
Returns a long indicating the position of the record
Definition at line 2232 of file parserInternals.c.
Referenced by xmlParserAddNodeInfo(), and xmlParserFindNodeInfo().
| XML_DEPRECATED XMLPUBFUN int xmlParserInputGrow | ( | xmlParserInputPtr | in, |
| int | len | ||
| ) |
xmlParserInputGrow: @in: an XML parser input @len: an indicative size for the lookahead
DEPRECATED: Don't use.
This function increase the input for the parser. It tries to preserve pointers to the input buffer, and keep already read data
Returns the amount of char read, or -1 in case of error, 0 indicate the end of this entity
Definition at line 567 of file parserInternals.c.
| XML_DEPRECATED XMLPUBFUN int xmlParserInputRead | ( | xmlParserInputPtr in | ATTRIBUTE_UNUSED, |
| int len | ATTRIBUTE_UNUSED | ||
| ) |
xmlParserInputRead: @in: an XML parser input @len: an indicative size for the lookahead
DEPRECATED: This function was internal and is deprecated.
Returns -1 as this is an error to use it.
Definition at line 498 of file parserInternals.c.
| XML_DEPRECATED XMLPUBFUN int xmlPedanticParserDefault | ( | int | val | ) |
xmlPedanticParserDefault: @val: int 0 or 1
DEPRECATED: Use the modern options API with XML_PARSE_PEDANTIC.
Set and return the previous value for enabling pedantic warnings.
Returns the last value for 0 for no substitution, 1 for substitution.
Definition at line 2348 of file parserInternals.c.
| XMLPUBFUN xmlDocPtr xmlReadDoc | ( | const xmlChar * | cur, |
| const char * | URL, | ||
| const char * | encoding, | ||
| int | options | ||
| ) |
xmlReadDoc: @cur: a pointer to a zero terminated string @URL: the base URL to use for the document @encoding: the document encoding, or NULL @options: a combination of xmlParserOption
parse an XML in-memory document and build a tree.
Returns the resulting document tree
Definition at line 14786 of file parser.c.
xmlReadFd: @fd: an open file descriptor @URL: the base URL to use for the document @encoding: the document encoding, or NULL @options: a combination of xmlParserOption
parse an XML from a file descriptor and build a tree. NOTE that the file descriptor will not be closed when the reader is closed or reset.
Returns the resulting document tree
Definition at line 14860 of file parser.c.
xmlReadFile: @filename: a file or URL @encoding: the document encoding, or NULL @options: a combination of xmlParserOption
parse an XML file from the filesystem or the network.
Returns the resulting document tree
Definition at line 14811 of file parser.c.
| XMLPUBFUN xmlDocPtr xmlReadIO | ( | xmlInputReadCallback | ioread, |
| xmlInputCloseCallback | ioclose, | ||
| void * | ioctx, | ||
| const char * | URL, | ||
| const char * | encoding, | ||
| int | options | ||
| ) |
xmlReadIO: @ioread: an I/O read function @ioclose: an I/O close function @ioctx: an I/O handler @URL: the base URL to use for the document @encoding: the document encoding, or NULL @options: a combination of xmlParserOption
parse an XML document from I/O functions and source and build a tree.
Returns the resulting document tree
Definition at line 14903 of file parser.c.
| XMLPUBFUN xmlDocPtr xmlReadMemory | ( | const char * | buffer, |
| int | size, | ||
| const char * | URL, | ||
| const char * | encoding, | ||
| int | options | ||
| ) |
xmlReadMemory: @buffer: a pointer to a char array @size: the size of the array @URL: the base URL to use for the document @encoding: the document encoding, or NULL @options: a combination of xmlParserOption
parse an XML in-memory document and build a tree.
Returns the resulting document tree
Definition at line 14835 of file parser.c.
Referenced by parse_xml().
| XMLPUBFUN void xmlSetExternalEntityLoader | ( | xmlExternalEntityLoader | f | ) |
Referenced by schemasCleanup(), and schemasInit().
xmlStopParser: @ctxt: an XML parser context
Blocks further parser processing
Definition at line 12311 of file parser.c.
Referenced by format_error_message_from_id(), libxmlFatalError(), and xmlSwitchEncoding().
| XML_DEPRECATED XMLPUBFUN int xmlSubstituteEntitiesDefault | ( | int | val | ) |
xmlSubstituteEntitiesDefault: @val: int 0 or 1
DEPRECATED: Use the modern options API with XML_PARSE_NOENT.
Set and return the previous value for default entity support. Initially the parser always keep entity references instead of substituting entity values in the output. This function has to be used to change the default parser behavior SAX::substituteEntities() has to be used for changing that on a file by file basis.
Returns the last value for 0 for no substitution, 1 for substitution.
Definition at line 2392 of file parserInternals.c.
| XML_DEPRECATED XMLPUBFUN int xmlThrDefDoValidityCheckingDefaultValue | ( | int | v | ) |
| XML_DEPRECATED XMLPUBFUN int xmlThrDefGetWarningsDefaultValue | ( | int | v | ) |
| XML_DEPRECATED XMLPUBFUN int xmlThrDefKeepBlanksDefaultValue | ( | int | v | ) |
| XML_DEPRECATED XMLPUBFUN int xmlThrDefLineNumbersDefaultValue | ( | int | v | ) |
| XML_DEPRECATED XMLPUBFUN int xmlThrDefLoadExtDtdDefaultValue | ( | int | v | ) |
| XML_DEPRECATED XMLPUBFUN int xmlThrDefParserDebugEntities | ( | int | v | ) |
| XML_DEPRECATED XMLPUBFUN int xmlThrDefPedanticParserDefaultValue | ( | int | v | ) |
| XML_DEPRECATED XMLPUBFUN int xmlThrDefSubstituteEntitiesDefaultValue | ( | int | v | ) |