API of the XML streaming API based on C# interfaces. Table of ContentsEnum xmlParserProperties
Enum xmlParserSeverities
Enum xmlReaderTypes
Structure xmlTextReader struct _xmlTextReader
The content of this structure is not made public by the API.
Typedef void * xmlTextReaderLocatorPtr
Enum xmlTextReaderMode
Typedef xmlTextReader * xmlTextReaderPtr
void xmlFreeTextReader (xmlTextReaderPtr reader)
xmlTextReaderPtr xmlNewTextReader (xmlParserInputBufferPtr input, const char * URI)
xmlTextReaderPtr xmlNewTextReaderFilename (const char * URI)
xmlTextReaderPtr xmlReaderForDoc (const xmlChar * cur, const char * URL, const char * encoding, int options)
xmlTextReaderPtr xmlReaderForFd (int fd, const char * URL, const char * encoding, int options)
xmlTextReaderPtr xmlReaderForFile (const char * filename, const char * encoding, int options)
xmlTextReaderPtr xmlReaderForIO (xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void * ioctx, const char * URL, const char * encoding, int options)
xmlTextReaderPtr xmlReaderForMemory (const char * buffer, int size, const char * URL, const char * encoding, int options)
int xmlReaderNewDoc (xmlTextReaderPtr reader, const xmlChar * cur, const char * URL, const char * encoding, int options)
int xmlReaderNewFd (xmlTextReaderPtr reader, int fd, const char * URL, const char * encoding, int options)
int xmlReaderNewFile (xmlTextReaderPtr reader, const char * filename, const char * encoding, int options)
int xmlReaderNewIO (xmlTextReaderPtr reader, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void * ioctx, const char * URL, const char * encoding, int options)
int xmlReaderNewMemory (xmlTextReaderPtr reader, const char * buffer, int size, const char * URL, const char * encoding, int options)
int xmlReaderNewWalker (xmlTextReaderPtr reader, xmlDocPtr doc)
xmlTextReaderPtr xmlReaderWalker (xmlDocPtr doc)
int xmlTextReaderAttributeCount (xmlTextReaderPtr reader)
xmlChar * xmlTextReaderBaseUri (xmlTextReaderPtr reader)
long xmlTextReaderByteConsumed (xmlTextReaderPtr reader)
int xmlTextReaderClose (xmlTextReaderPtr reader)
const xmlChar * xmlTextReaderConstBaseUri (xmlTextReaderPtr reader)
const xmlChar * xmlTextReaderConstEncoding (xmlTextReaderPtr reader)
const xmlChar * xmlTextReaderConstLocalName (xmlTextReaderPtr reader)
const xmlChar * xmlTextReaderConstName (xmlTextReaderPtr reader)
const xmlChar * xmlTextReaderConstNamespaceUri (xmlTextReaderPtr reader)
const xmlChar * xmlTextReaderConstPrefix (xmlTextReaderPtr reader)
const xmlChar * xmlTextReaderConstString (xmlTextReaderPtr reader, const xmlChar * str)
const xmlChar * xmlTextReaderConstValue (xmlTextReaderPtr reader)
const xmlChar * xmlTextReaderConstXmlLang (xmlTextReaderPtr reader)
const xmlChar * xmlTextReaderConstXmlVersion (xmlTextReaderPtr reader)
xmlDocPtr xmlTextReaderCurrentDoc (xmlTextReaderPtr reader)
xmlNodePtr xmlTextReaderCurrentNode (xmlTextReaderPtr reader)
int xmlTextReaderDepth (xmlTextReaderPtr reader)
Function type: xmlTextReaderErrorFunc
void xmlTextReaderErrorFunc (void * arg, const char * msg, xmlParserSeverities severity, xmlTextReaderLocatorPtr locator)
xmlNodePtr xmlTextReaderExpand (xmlTextReaderPtr reader)
xmlChar * xmlTextReaderGetAttribute (xmlTextReaderPtr reader, const xmlChar * name)
xmlChar * xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader, int no)
xmlChar * xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader, const xmlChar * localName, const xmlChar * namespaceURI)
void xmlTextReaderGetErrorHandler (xmlTextReaderPtr reader, xmlTextReaderErrorFunc * f, void ** arg)
int xmlTextReaderGetParserColumnNumber (xmlTextReaderPtr reader)
int xmlTextReaderGetParserLineNumber (xmlTextReaderPtr reader)
int xmlTextReaderGetParserProp (xmlTextReaderPtr reader, int prop)
xmlParserInputBufferPtr xmlTextReaderGetRemainder (xmlTextReaderPtr reader)
int xmlTextReaderHasAttributes (xmlTextReaderPtr reader)
int xmlTextReaderHasValue (xmlTextReaderPtr reader)
int xmlTextReaderIsDefault (xmlTextReaderPtr reader)
int xmlTextReaderIsEmptyElement (xmlTextReaderPtr reader)
int xmlTextReaderIsNamespaceDecl (xmlTextReaderPtr reader)
int xmlTextReaderIsValid (xmlTextReaderPtr reader)
xmlChar * xmlTextReaderLocalName (xmlTextReaderPtr reader)
xmlChar * xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator)
int xmlTextReaderLocatorLineNumber (xmlTextReaderLocatorPtr locator)
xmlChar * xmlTextReaderLookupNamespace (xmlTextReaderPtr reader, const xmlChar * prefix)
int xmlTextReaderMoveToAttribute (xmlTextReaderPtr reader, const xmlChar * name)
int xmlTextReaderMoveToAttributeNo (xmlTextReaderPtr reader, int no)
int xmlTextReaderMoveToAttributeNs (xmlTextReaderPtr reader, const xmlChar * localName, const xmlChar * namespaceURI)
int xmlTextReaderMoveToElement (xmlTextReaderPtr reader)
int xmlTextReaderMoveToFirstAttribute (xmlTextReaderPtr reader)
int xmlTextReaderMoveToNextAttribute (xmlTextReaderPtr reader)
xmlChar * xmlTextReaderName (xmlTextReaderPtr reader)
xmlChar * xmlTextReaderNamespaceUri (xmlTextReaderPtr reader)
int xmlTextReaderNext (xmlTextReaderPtr reader)
int xmlTextReaderNextSibling (xmlTextReaderPtr reader)
int xmlTextReaderNodeType (xmlTextReaderPtr reader)
int xmlTextReaderNormalization (xmlTextReaderPtr reader)
xmlChar * xmlTextReaderPrefix (xmlTextReaderPtr reader)
xmlNodePtr xmlTextReaderPreserve (xmlTextReaderPtr reader)
int xmlTextReaderPreservePattern (xmlTextReaderPtr reader, const xmlChar * pattern, const xmlChar ** namespaces)
int xmlTextReaderQuoteChar (xmlTextReaderPtr reader)
int xmlTextReaderRead (xmlTextReaderPtr reader)
int xmlTextReaderReadAttributeValue (xmlTextReaderPtr reader)
xmlChar * xmlTextReaderReadInnerXml (xmlTextReaderPtr reader)
xmlChar * xmlTextReaderReadOuterXml (xmlTextReaderPtr reader)
int xmlTextReaderReadState (xmlTextReaderPtr reader)
xmlChar * xmlTextReaderReadString (xmlTextReaderPtr reader)
int xmlTextReaderRelaxNGSetSchema (xmlTextReaderPtr reader, xmlRelaxNGPtr schema)
int xmlTextReaderRelaxNGValidate (xmlTextReaderPtr reader, const char * rng)
int xmlTextReaderSchemaValidate (xmlTextReaderPtr reader, const char * xsd)
int xmlTextReaderSchemaValidateCtxt (xmlTextReaderPtr reader, xmlSchemaValidCtxtPtr ctxt, int options)
void xmlTextReaderSetErrorHandler (xmlTextReaderPtr reader, xmlTextReaderErrorFunc f, void * arg)
int xmlTextReaderSetParserProp (xmlTextReaderPtr reader, int prop, int value)
int xmlTextReaderSetSchema (xmlTextReaderPtr reader, xmlSchemaPtr schema)
void xmlTextReaderSetStructuredErrorHandler (xmlTextReaderPtr reader, xmlStructuredErrorFunc f, void * arg)
int xmlTextReaderStandalone (xmlTextReaderPtr reader)
xmlChar * xmlTextReaderValue (xmlTextReaderPtr reader)
xmlChar * xmlTextReaderXmlLang (xmlTextReaderPtr reader)
Description
Enum xmlParserProperties {
XML_PARSER_LOADDTD = 1
XML_PARSER_DEFAULTATTRS = 2
XML_PARSER_VALIDATE = 3
XML_PARSER_SUBST_ENTITIES = 4
}
Enum xmlParserSeverities {
XML_PARSER_SEVERITY_VALIDITY_WARNING = 1
XML_PARSER_SEVERITY_VALIDITY_ERROR = 2
XML_PARSER_SEVERITY_WARNING = 3
XML_PARSER_SEVERITY_ERROR = 4
}
Enum xmlReaderTypes {
XML_READER_TYPE_NONE = 0
XML_READER_TYPE_ELEMENT = 1
XML_READER_TYPE_ATTRIBUTE = 2
XML_READER_TYPE_TEXT = 3
XML_READER_TYPE_CDATA = 4
XML_READER_TYPE_ENTITY_REFERENCE = 5
XML_READER_TYPE_ENTITY = 6
XML_READER_TYPE_PROCESSING_INSTRUCTION = 7
= 8
XML_READER_TYPE_DOCUMENT = 9
XML_READER_TYPE_DOCUMENT_TYPE = 10
XML_READER_TYPE_DOCUMENT_FRAGMENT = 11
XML_READER_TYPE_NOTATION = 12
XML_READER_TYPE_WHITESPACE = 13
XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14
XML_READER_TYPE_END_ELEMENT = 15
XML_READER_TYPE_END_ENTITY = 16
XML_READER_TYPE_XML_DECLARATION = 17
}
Structure xmlTextReader struct _xmlTextReader {
The content of this structure is not made public by the API.
} Enum xmlTextReaderMode {
XML_TEXTREADER_MODE_INITIAL = 0
XML_TEXTREADER_MODE_INTERACTIVE = 1
XML_TEXTREADER_MODE_ERROR = 2
XML_TEXTREADER_MODE_EOF = 3
XML_TEXTREADER_MODE_CLOSED = 4
XML_TEXTREADER_MODE_READING = 5
}
Pointer to an xmlReader context.
Function: xmlFreeTextReadervoid xmlFreeTextReader (xmlTextReaderPtr reader)
Deallocate all the resources associated to the reader
Function: xmlNewTextReaderxmlTextReaderPtr xmlNewTextReader (xmlParserInputBufferPtr input, const char * URI)
Create an xmlTextReader structure fed with @input
Function: xmlNewTextReaderFilenamexmlTextReaderPtr xmlNewTextReaderFilename (const char * URI)
Create an xmlTextReader structure fed with the resource at @URI
URI: | the URI of the resource to process | Returns: | the new xmlTextReaderPtr or NULL in case of error |
Function: xmlReaderForDocxmlTextReaderPtr xmlReaderForDoc (const xmlChar * cur, const char * URL, const char * encoding, int options)
Create an xmltextReader for an XML in-memory document. The parsing flags @options are a combination of xmlParserOption.
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 | Returns: | the new reader or NULL in case of error. |
Function: xmlReaderForFdxmlTextReaderPtr xmlReaderForFd (int fd, const char * URL, const char * encoding, int options)
Create an xmltextReader for an XML from a file descriptor. The parsing flags @options are a combination of xmlParserOption. NOTE that the file descriptor will not be closed when the reader is closed or reset.
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 | Returns: | the new reader or NULL in case of error. |
Function: xmlReaderForFilexmlTextReaderPtr xmlReaderForFile (const char * filename, const char * encoding, int options)
parse an XML file from the filesystem or the network. The parsing flags @options are a combination of xmlParserOption.
filename: | a file or URL | encoding: | the document encoding, or NULL | options: | a combination of xmlParserOption | Returns: | the new reader or NULL in case of error. |
Function: xmlReaderForIOxmlTextReaderPtr xmlReaderForIO (xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void * ioctx, const char * URL, const char * encoding, int options)
Create an xmltextReader for an XML document from I/O functions and source. The parsing flags @options are a combination of xmlParserOption.
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 | Returns: | the new reader or NULL in case of error. |
Function: xmlReaderForMemoryxmlTextReaderPtr xmlReaderForMemory (const char * buffer, int size, const char * URL, const char * encoding, int options)
Create an xmltextReader for an XML in-memory document. The parsing flags @options are a combination of xmlParserOption.
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 | Returns: | the new reader or NULL in case of error. |
Function: xmlReaderNewDocint xmlReaderNewDoc (xmlTextReaderPtr reader, const xmlChar * cur, const char * URL, const char * encoding, int options)
Setup an xmltextReader to parse an XML in-memory document. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.
reader: | an XML reader | 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 | Returns: | 0 in case of success and -1 in case of error |
Function: xmlReaderNewFdint xmlReaderNewFd (xmlTextReaderPtr reader, int fd, const char * URL, const char * encoding, int options)
Setup an xmltextReader to parse an XML from a file descriptor. NOTE that the file descriptor will not be closed when the reader is closed or reset. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.
reader: | an XML reader | 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 | Returns: | 0 in case of success and -1 in case of error |
Function: xmlReaderNewFileint xmlReaderNewFile (xmlTextReaderPtr reader, const char * filename, const char * encoding, int options)
parse an XML file from the filesystem or the network. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.
reader: | an XML reader | filename: | a file or URL | encoding: | the document encoding, or NULL | options: | a combination of xmlParserOption | Returns: | 0 in case of success and -1 in case of error |
Function: xmlReaderNewIOint xmlReaderNewIO (xmlTextReaderPtr reader, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void * ioctx, const char * URL, const char * encoding, int options)
Setup an xmltextReader to parse an XML document from I/O functions and source. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.
reader: | an XML reader | 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 | Returns: | 0 in case of success and -1 in case of error |
Function: xmlReaderNewMemoryint xmlReaderNewMemory (xmlTextReaderPtr reader, const char * buffer, int size, const char * URL, const char * encoding, int options)
Setup an xmltextReader to parse an XML in-memory document. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader.
reader: | an XML reader | 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 | Returns: | 0 in case of success and -1 in case of error |
Function: xmlReaderNewWalkerint xmlReaderNewWalker (xmlTextReaderPtr reader, xmlDocPtr doc)
Setup an xmltextReader to parse a preparsed XML document. This reuses the existing @reader xmlTextReader.
reader: | an XML reader | doc: | a preparsed document | Returns: | 0 in case of success and -1 in case of error |
Function: xmlReaderWalkerxmlTextReaderPtr xmlReaderWalker (xmlDocPtr doc)
Create an xmltextReader for a preparsed document.
doc: | a preparsed document | Returns: | the new reader or NULL in case of error. |
Function: xmlTextReaderAttributeCountint xmlTextReaderAttributeCount (xmlTextReaderPtr reader)
Provides the number of attributes of the current node
Function: xmlTextReaderBaseUrixmlChar * xmlTextReaderBaseUri (xmlTextReaderPtr reader)
The base URI of the node.
Function: xmlTextReaderByteConsumedlong xmlTextReaderByteConsumed (xmlTextReaderPtr reader)
This function provides the current index of the parser used by the reader, relative to the start of the current entity. This function actually just wraps a call to xmlBytesConsumed() for the parser context associated with the reader. See xmlBytesConsumed() for more information.
reader: | an XML reader | Returns: | the index in bytes from the beginning of the entity or -1 in case the index could not be computed. |
Function: xmlTextReaderCloseint xmlTextReaderClose (xmlTextReaderPtr reader)
This method releases any resources allocated by the current instance changes the state to Closed and close any underlying input.
Function: xmlTextReaderConstBaseUriconst xmlChar * xmlTextReaderConstBaseUri (xmlTextReaderPtr reader)
The base URI of the node.
reader: | the xmlTextReaderPtr used | Returns: | the base URI or NULL if not available, the string will be deallocated with the reader |
Function: xmlTextReaderConstEncodingconst xmlChar * xmlTextReaderConstEncoding (xmlTextReaderPtr reader)
Determine the encoding of the document being read.
reader: | the xmlTextReaderPtr used | Returns: | a string containing the encoding of the document or NULL in case of error. The string is deallocated with the reader. |
Function: xmlTextReaderConstLocalNameconst xmlChar * xmlTextReaderConstLocalName (xmlTextReaderPtr reader)
The local name of the node.
reader: | the xmlTextReaderPtr used | Returns: | the local name or NULL if not available, the string will be deallocated with the reader. |
Function: xmlTextReaderConstNameconst xmlChar * xmlTextReaderConstName (xmlTextReaderPtr reader)
The qualified name of the node, equal to Prefix :LocalName.
reader: | the xmlTextReaderPtr used | Returns: | the local name or NULL if not available, the string is deallocated with the reader. |
Function: xmlTextReaderConstNamespaceUriconst xmlChar * xmlTextReaderConstNamespaceUri (xmlTextReaderPtr reader)
The URI defining the namespace associated with the node.
reader: | the xmlTextReaderPtr used | Returns: | the namespace URI or NULL if not available, the string will be deallocated with the reader |
Function: xmlTextReaderConstPrefixconst xmlChar * xmlTextReaderConstPrefix (xmlTextReaderPtr reader)
A shorthand reference to the namespace associated with the node.
reader: | the xmlTextReaderPtr used | Returns: | the prefix or NULL if not available, the string is deallocated with the reader. |
Function: xmlTextReaderConstStringconst xmlChar * xmlTextReaderConstString (xmlTextReaderPtr reader, const xmlChar * str)
Get an interned string from the reader, allows for example to speedup string name comparisons
reader: | the xmlTextReaderPtr used | str: | the string to intern. | Returns: | an interned copy of the string or NULL in case of error. The string will be deallocated with the reader. |
Function: xmlTextReaderConstValueconst xmlChar * xmlTextReaderConstValue (xmlTextReaderPtr reader)
Provides the text value of the node if present
reader: | the xmlTextReaderPtr used | Returns: | the string or NULL if not available. The result will be deallocated on the next Read() operation. |
Function: xmlTextReaderConstXmlLangconst xmlChar * xmlTextReaderConstXmlLang (xmlTextReaderPtr reader)
The xml:lang scope within which the node resides.
reader: | the xmlTextReaderPtr used | Returns: | the xml:lang value or NULL if none exists. |
Function: xmlTextReaderConstXmlVersionconst xmlChar * xmlTextReaderConstXmlVersion (xmlTextReaderPtr reader)
Determine the XML version of the document being read.
reader: | the xmlTextReaderPtr used | Returns: | a string containing the XML version of the document or NULL in case of error. The string is deallocated with the reader. |
Function: xmlTextReaderCurrentDocxmlDocPtr xmlTextReaderCurrentDoc (xmlTextReaderPtr reader)
Hacking interface allowing to get the xmlDocPtr correponding to the current document being accessed by the xmlTextReader. NOTE: as a result of this call, the reader will not destroy the associated XML document and calling xmlFreeDoc() on the result is needed once the reader parsing has finished.
Function: xmlTextReaderCurrentNodexmlNodePtr xmlTextReaderCurrentNode (xmlTextReaderPtr reader)
Hacking interface allowing to get the xmlNodePtr correponding to the current node being accessed by the xmlTextReader. This is dangerous because the underlying node may be destroyed on the next Reads.
Function: xmlTextReaderDepthint xmlTextReaderDepth (xmlTextReaderPtr reader)
The depth of the node in the tree.
Function type: xmlTextReaderErrorFuncFunction type: xmlTextReaderErrorFunc
void xmlTextReaderErrorFunc (void * arg, const char * msg, xmlParserSeverities severity, xmlTextReaderLocatorPtr locator)
arg: | | msg: | | severity: | | locator: | |
Function: xmlTextReaderExpandxmlNodePtr xmlTextReaderExpand (xmlTextReaderPtr reader)
Reads the contents of the current node and the full subtree. It then makes the subtree available until the next xmlTextReaderRead() call
reader: | the xmlTextReaderPtr used | Returns: | a node pointer valid until the next xmlTextReaderRead() call or NULL in case of error. |
Function: xmlTextReaderGetAttributexmlChar * xmlTextReaderGetAttribute (xmlTextReaderPtr reader, const xmlChar * name)
Provides the value of the attribute with the specified qualified name.
reader: | the xmlTextReaderPtr used | name: | the qualified name of the attribute. | Returns: | a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller. |
Function: xmlTextReaderGetAttributeNoxmlChar * xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader, int no)
Provides the value of the attribute with the specified index relative to the containing element.
reader: | the xmlTextReaderPtr used | no: | the zero-based index of the attribute relative to the containing element | Returns: | a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller. |
Function: xmlTextReaderGetAttributeNsxmlChar * xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader, const xmlChar * localName, const xmlChar * namespaceURI)
Provides the value of the specified attribute
reader: | the xmlTextReaderPtr used | localName: | the local name of the attribute. | namespaceURI: | the namespace URI of the attribute. | Returns: | a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller. |
Function: xmlTextReaderGetErrorHandlervoid xmlTextReaderGetErrorHandler (xmlTextReaderPtr reader, xmlTextReaderErrorFunc * f, void ** arg)
Retrieve the error callback function and user argument.
reader: | the xmlTextReaderPtr used | f: | the callback function or NULL is no callback has been registered | arg: | a user argument |
Function: xmlTextReaderGetParserColumnNumberint xmlTextReaderGetParserColumnNumber (xmlTextReaderPtr reader)
Provide the column number of the current parsing point.
reader: | the user data (XML reader context) | Returns: | an int or 0 if not available |
Function: xmlTextReaderGetParserLineNumberint xmlTextReaderGetParserLineNumber (xmlTextReaderPtr reader)
Provide the line number of the current parsing point.
reader: | the user data (XML reader context) | Returns: | an int or 0 if not available |
Function: xmlTextReaderGetParserPropint xmlTextReaderGetParserProp (xmlTextReaderPtr reader, int prop)
Read the parser internal property.
Function: xmlTextReaderGetRemainderxmlParserInputBufferPtr xmlTextReaderGetRemainder (xmlTextReaderPtr reader)
Method to get the remainder of the buffered XML. this method stops the parser, set its state to End Of File and return the input stream with what is left that the parser did not use. The implementation is not good, the parser certainly procgressed past what's left in reader->input, and there is an allocation problem. Best would be to rewrite it differently.
Function: xmlTextReaderHasAttributesint xmlTextReaderHasAttributes (xmlTextReaderPtr reader)
Whether the node has attributes.
reader: | the xmlTextReaderPtr used | Returns: | 1 if true, 0 if false, and -1 in case or error |
Function: xmlTextReaderHasValueint xmlTextReaderHasValue (xmlTextReaderPtr reader)
Whether the node can have a text value.
reader: | the xmlTextReaderPtr used | Returns: | 1 if true, 0 if false, and -1 in case or error |
Function: xmlTextReaderIsDefaultint xmlTextReaderIsDefault (xmlTextReaderPtr reader)
Whether an Attribute node was generated from the default value defined in the DTD or schema.
reader: | the xmlTextReaderPtr used | Returns: | 0 if not defaulted, 1 if defaulted, and -1 in case of error |
Function: xmlTextReaderIsEmptyElementint xmlTextReaderIsEmptyElement (xmlTextReaderPtr reader)
Check if the current node is empty
reader: | the xmlTextReaderPtr used | Returns: | 1 if empty, 0 if not and -1 in case of error |
Function: xmlTextReaderIsNamespaceDeclint xmlTextReaderIsNamespaceDecl (xmlTextReaderPtr reader)
Determine whether the current node is a namespace declaration rather than a regular attribute.
reader: | the xmlTextReaderPtr used | Returns: | 1 if the current node is a namespace declaration, 0 if it is a regular attribute or other type of node, or -1 in case of error. |
Function: xmlTextReaderIsValidint xmlTextReaderIsValid (xmlTextReaderPtr reader)
Retrieve the validity status from the parser context
reader: | the xmlTextReaderPtr used | Returns: | the flag value 1 if valid, 0 if no, and -1 in case of error |
Function: xmlTextReaderLocalNamexmlChar * xmlTextReaderLocalName (xmlTextReaderPtr reader)
The local name of the node.
Function: xmlTextReaderLocatorBaseURIxmlChar * xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator)
Obtain the base URI for the given locator.
Function: xmlTextReaderLocatorLineNumberint xmlTextReaderLocatorLineNumber (xmlTextReaderLocatorPtr locator)
Obtain the line number for the given locator.
Function: xmlTextReaderLookupNamespacexmlChar * xmlTextReaderLookupNamespace (xmlTextReaderPtr reader, const xmlChar * prefix)
Resolves a namespace prefix in the scope of the current element.
reader: | the xmlTextReaderPtr used | prefix: | the prefix whose namespace URI is to be resolved. To return the default namespace, specify NULL | Returns: | a string containing the namespace URI to which the prefix maps or NULL in case of error. The string must be deallocated by the caller. |
Function: xmlTextReaderMoveToAttributeint xmlTextReaderMoveToAttribute (xmlTextReaderPtr reader, const xmlChar * name)
Moves the position of the current instance to the attribute with the specified qualified name.
reader: | the xmlTextReaderPtr used | name: | the qualified name of the attribute. | Returns: | 1 in case of success, -1 in case of error, 0 if not found |
Function: xmlTextReaderMoveToAttributeNoint xmlTextReaderMoveToAttributeNo (xmlTextReaderPtr reader, int no)
Moves the position of the current instance to the attribute with the specified index relative to the containing element.
reader: | the xmlTextReaderPtr used | no: | the zero-based index of the attribute relative to the containing element. | Returns: | 1 in case of success, -1 in case of error, 0 if not found |
Function: xmlTextReaderMoveToAttributeNsint xmlTextReaderMoveToAttributeNs (xmlTextReaderPtr reader, const xmlChar * localName, const xmlChar * namespaceURI)
Moves the position of the current instance to the attribute with the specified local name and namespace URI.
reader: | the xmlTextReaderPtr used | localName: | the local name of the attribute. | namespaceURI: | the namespace URI of the attribute. | Returns: | 1 in case of success, -1 in case of error, 0 if not found |
Function: xmlTextReaderMoveToElementint xmlTextReaderMoveToElement (xmlTextReaderPtr reader)
Moves the position of the current instance to the node that contains the current Attribute node.
reader: | the xmlTextReaderPtr used | Returns: | 1 in case of success, -1 in case of error, 0 if not moved |
Function: xmlTextReaderMoveToFirstAttributeint xmlTextReaderMoveToFirstAttribute (xmlTextReaderPtr reader)
Moves the position of the current instance to the first attribute associated with the current node.
reader: | the xmlTextReaderPtr used | Returns: | 1 in case of success, -1 in case of error, 0 if not found |
Function: xmlTextReaderMoveToNextAttributeint xmlTextReaderMoveToNextAttribute (xmlTextReaderPtr reader)
Moves the position of the current instance to the next attribute associated with the current node.
reader: | the xmlTextReaderPtr used | Returns: | 1 in case of success, -1 in case of error, 0 if not found |
Function: xmlTextReaderNamexmlChar * xmlTextReaderName (xmlTextReaderPtr reader)
The qualified name of the node, equal to Prefix :LocalName.
Function: xmlTextReaderNamespaceUrixmlChar * xmlTextReaderNamespaceUri (xmlTextReaderPtr reader)
The URI defining the namespace associated with the node.
reader: | the xmlTextReaderPtr used | Returns: | the namespace URI or NULL if not available |
Function: xmlTextReaderNextint xmlTextReaderNext (xmlTextReaderPtr reader)
Skip to the node following the current one in document order while avoiding the subtree if any.
reader: | the xmlTextReaderPtr used | Returns: | 1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error |
Function: xmlTextReaderNextSiblingint xmlTextReaderNextSibling (xmlTextReaderPtr reader)
Skip to the node following the current one in document order while avoiding the subtree if any. Currently implemented only for Readers built on a document
reader: | the xmlTextReaderPtr used | Returns: | 1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error |
Function: xmlTextReaderNodeTypeint xmlTextReaderNodeType (xmlTextReaderPtr reader)
Get the node type of the current node Reference: http://dotgnu.org/pnetlib-doc/System/Xml/XmlNodeType.html
reader: | the xmlTextReaderPtr used | Returns: | the xmlNodeType of the current node or -1 in case of error |
Function: xmlTextReaderNormalizationint xmlTextReaderNormalization (xmlTextReaderPtr reader)
The value indicating whether to normalize white space and attribute values. Since attribute value and end of line normalizations are a MUST in the XML specification only the value true is accepted. The broken bahaviour of accepting out of range character entities like � is of course not supported either.
Function: xmlTextReaderPrefixxmlChar * xmlTextReaderPrefix (xmlTextReaderPtr reader)
A shorthand reference to the namespace associated with the node.
Function: xmlTextReaderPreservexmlNodePtr xmlTextReaderPreserve (xmlTextReaderPtr reader)
This tells the XML Reader to preserve the current node. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished
Function: xmlTextReaderPreservePatternint xmlTextReaderPreservePattern (xmlTextReaderPtr reader, const xmlChar * pattern, const xmlChar ** namespaces)
This tells the XML Reader to preserve all nodes matched by the pattern. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished
reader: | the xmlTextReaderPtr used | pattern: | an XPath subset pattern | namespaces: | the prefix definitions, array of [URI, prefix] or NULL | Returns: | a positive number in case of success and -1 in case of error |
Function: xmlTextReaderQuoteCharint xmlTextReaderQuoteChar (xmlTextReaderPtr reader)
The quotation mark character used to enclose the value of an attribute.
Function: xmlTextReaderReadint xmlTextReaderRead (xmlTextReaderPtr reader)
Moves the position of the current instance to the next node in the stream, exposing its properties.
reader: | the xmlTextReaderPtr used | Returns: | 1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error |
Function: xmlTextReaderReadAttributeValueint xmlTextReaderReadAttributeValue (xmlTextReaderPtr reader)
Parses an attribute value into one or more Text and EntityReference nodes.
reader: | the xmlTextReaderPtr used | Returns: | 1 in case of success, 0 if the reader was not positionned on an ttribute node or all the attribute values have been read, or -1 in case of error. |
Function: xmlTextReaderReadInnerXmlxmlChar * xmlTextReaderReadInnerXml (xmlTextReaderPtr reader)
Reads the contents of the current node, including child nodes and markup.
reader: | the xmlTextReaderPtr used | Returns: | a string containing the XML content, or NULL if the current node is neither an element nor attribute, or has no child nodes. The string must be deallocated by the caller. |
Function: xmlTextReaderReadOuterXmlxmlChar * xmlTextReaderReadOuterXml (xmlTextReaderPtr reader)
Reads the contents of the current node, including child nodes and markup.
reader: | the xmlTextReaderPtr used | Returns: | a string containing the XML content, or NULL if the current node is neither an element nor attribute, or has no child nodes. The string must be deallocated by the caller. |
Function: xmlTextReaderReadStateint xmlTextReaderReadState (xmlTextReaderPtr reader)
Gets the read state of the reader.
Function: xmlTextReaderReadStringxmlChar * xmlTextReaderReadString (xmlTextReaderPtr reader)
Reads the contents of an element or a text node as a string.
reader: | the xmlTextReaderPtr used | Returns: | a string containing the contents of the Element or Text node, or NULL if the reader is positioned on any other type of node. The string must be deallocated by the caller. |
Function: xmlTextReaderRelaxNGSetSchemaint xmlTextReaderRelaxNGSetSchema (xmlTextReaderPtr reader, xmlRelaxNGPtr schema)
Use RelaxNG to validate the document as it is processed. Activation is only possible before the first Read(). if @schema is NULL, then RelaxNG validation is desactivated. @ The @schema should not be freed until the reader is deallocated or its use has been deactivated.
reader: | the xmlTextReaderPtr used | schema: | a precompiled RelaxNG schema | Returns: | 0 in case the RelaxNG validation could be (des)activated and -1 in case of error. |
Function: xmlTextReaderRelaxNGValidateint xmlTextReaderRelaxNGValidate (xmlTextReaderPtr reader, const char * rng)
Use RelaxNG to validate the document as it is processed. Activation is only possible before the first Read(). if @rng is NULL, then RelaxNG validation is desactivated.
reader: | the xmlTextReaderPtr used | rng: | the path to a RelaxNG schema or NULL | Returns: | 0 in case the RelaxNG validation could be (des)activated and -1 in case of error. |
Function: xmlTextReaderSchemaValidateint xmlTextReaderSchemaValidate (xmlTextReaderPtr reader, const char * xsd)
Use W3C XSD schema to validate the document as it is processed. Activation is only possible before the first Read(). If @xsd is NULL, then XML Schema validation is deactivated.
reader: | the xmlTextReaderPtr used | xsd: | the path to a W3C XSD schema or NULL | Returns: | 0 in case the schemas validation could be (de)activated and -1 in case of error. |
Function: xmlTextReaderSchemaValidateCtxtint xmlTextReaderSchemaValidateCtxt (xmlTextReaderPtr reader, xmlSchemaValidCtxtPtr ctxt, int options)
Use W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is NULL, then XML Schema validation is deactivated.
reader: | the xmlTextReaderPtr used | ctxt: | the XML Schema validation context or NULL | options: | options (not used yet) | Returns: | 0 in case the schemas validation could be (de)activated and -1 in case of error. |
Function: xmlTextReaderSetErrorHandlervoid xmlTextReaderSetErrorHandler (xmlTextReaderPtr reader, xmlTextReaderErrorFunc f, void * arg)
Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.
reader: | the xmlTextReaderPtr used | f: | the callback function to call on error and warnings | arg: | a user argument to pass to the callback function |
Function: xmlTextReaderSetParserPropint xmlTextReaderSetParserProp (xmlTextReaderPtr reader, int prop, int value)
Change the parser processing behaviour by changing some of its internal properties. Note that some properties can only be changed before any read has been done.
Function: xmlTextReaderSetSchemaint xmlTextReaderSetSchema (xmlTextReaderPtr reader, xmlSchemaPtr schema)
Use XSD Schema to validate the document as it is processed. Activation is only possible before the first Read(). if @schema is NULL, then Schema validation is desactivated. @ The @schema should not be freed until the reader is deallocated or its use has been deactivated.
reader: | the xmlTextReaderPtr used | schema: | a precompiled Schema schema | Returns: | 0 in case the Schema validation could be (des)activated and -1 in case of error. |
Function: xmlTextReaderSetStructuredErrorHandlervoid xmlTextReaderSetStructuredErrorHandler (xmlTextReaderPtr reader, xmlStructuredErrorFunc f, void * arg)
Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.
reader: | the xmlTextReaderPtr used | f: | the callback function to call on error and warnings | arg: | a user argument to pass to the callback function |
Function: xmlTextReaderStandaloneint xmlTextReaderStandalone (xmlTextReaderPtr reader)
Determine the standalone status of the document being read.
reader: | the xmlTextReaderPtr used | Returns: | 1 if the document was declared to be standalone, 0 if it was declared to be not standalone, or -1 if the document did not specify its standalone status or in case of error. |
Function: xmlTextReaderValuexmlChar * xmlTextReaderValue (xmlTextReaderPtr reader)
Provides the text value of the node if present
reader: | the xmlTextReaderPtr used | Returns: | the string or NULL if not available. The result must be deallocated with xmlFree() |
Function: xmlTextReaderXmlLangxmlChar * xmlTextReaderXmlLang (xmlTextReaderPtr reader)
The xml:lang scope within which the node resides.
reader: | the xmlTextReaderPtr used | Returns: | the xml:lang value or NULL if none exists. |
Daniel Veillard |