|
libxml2
|
the XMLReader implementation More...
Typedefs | |
| typedef struct _xmlTextReader | xmlTextReader |
| xmlReader context | |
| typedef void(* | xmlTextReaderErrorFunc) (void *arg, const char *msg, xmlParserSeverities severity, xmlTextReaderLocatorPtr locator) |
| Signature of an error callback from a reader parser. | |
Enumerations | |
| enum | xmlParserSeverities |
| How severe an error callback is when the per-reader error callback API is used. | |
| enum | xmlTextReaderMode |
| Internal state values for the reader. | |
| enum | xmlParserProperties |
| Some common options to use with xmlTextReaderSetParserProp, but it is better to use xmlParserOption and the xmlReaderNewxxx and xmlReaderForxxx APIs now. | |
| enum | xmlReaderTypes |
| Predefined constants for the different types of nodes. More... | |
Functions | |
| xmlTextReader * | xmlNewTextReader (xmlParserInputBuffer *input, const char *URI) |
| Create an xmlTextReader structure fed with input | |
| xmlTextReader * | xmlNewTextReaderFilename (const char *URI) |
| Create an xmlTextReader structure fed with the resource at URI | |
| void | xmlFreeTextReader (xmlTextReader *reader) |
| Deallocate all the resources associated to the reader. | |
| int | xmlTextReaderSetup (xmlTextReader *reader, xmlParserInputBuffer *input, const char *URL, const char *encoding, int options) |
| Setup an XML reader with new options. | |
| void | xmlTextReaderSetMaxAmplification (xmlTextReader *reader, unsigned maxAmpl) |
| Set the maximum amplification factor. | |
| const xmlError * | xmlTextReaderGetLastError (xmlTextReader *reader) |
| int | xmlTextReaderRead (xmlTextReader *reader) |
| Moves the position of the current instance to the next node in the stream, exposing its properties. | |
| xmlChar * | xmlTextReaderReadInnerXml (xmlTextReader *reader) |
| Reads the contents of the current node, including child nodes and markup. | |
| xmlChar * | xmlTextReaderReadOuterXml (xmlTextReader *reader) |
| Reads the contents of the current node, including child nodes and markup. | |
| xmlChar * | xmlTextReaderReadString (xmlTextReader *reader) |
| Reads the contents of an element or a text node as a string. | |
| int | xmlTextReaderReadAttributeValue (xmlTextReader *reader) |
| Parses an attribute value into one or more Text and EntityReference nodes. | |
| int | xmlTextReaderAttributeCount (xmlTextReader *reader) |
| Provides the number of attributes of the current node. | |
| int | xmlTextReaderDepth (xmlTextReader *reader) |
| The depth of the node in the tree. | |
| int | xmlTextReaderHasAttributes (xmlTextReader *reader) |
| Whether the node has attributes. | |
| int | xmlTextReaderHasValue (xmlTextReader *reader) |
| Whether the node can have a text value. | |
| int | xmlTextReaderIsDefault (xmlTextReader *reader) |
| Whether an Attribute node was generated from the default value defined in the DTD or schema. | |
| int | xmlTextReaderIsEmptyElement (xmlTextReader *reader) |
| Check if the current node is empty. | |
| int | xmlTextReaderNodeType (xmlTextReader *reader) |
| Get the node type of the current node Reference: http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/XmlNodeType.html. | |
| int | xmlTextReaderQuoteChar (xmlTextReader *reader) |
| The quotation mark character used to enclose the value of an attribute. | |
| int | xmlTextReaderReadState (xmlTextReader *reader) |
| Gets the read state of the reader. | |
| int | xmlTextReaderIsNamespaceDecl (xmlTextReader *reader) |
| Determine whether the current node is a namespace declaration rather than a regular attribute. | |
| const xmlChar * | xmlTextReaderConstBaseUri (xmlTextReader *reader) |
| The base URI of the node. | |
| const xmlChar * | xmlTextReaderConstLocalName (xmlTextReader *reader) |
| The local name of the node. | |
| const xmlChar * | xmlTextReaderConstName (xmlTextReader *reader) |
| The qualified name of the node, equal to Prefix :LocalName. | |
| const xmlChar * | xmlTextReaderConstNamespaceUri (xmlTextReader *reader) |
| The URI defining the namespace associated with the node. | |
| const xmlChar * | xmlTextReaderConstPrefix (xmlTextReader *reader) |
| A shorthand reference to the namespace associated with the node. | |
| const xmlChar * | xmlTextReaderConstXmlLang (xmlTextReader *reader) |
| The xml:lang scope within which the node resides. | |
| const xmlChar * | xmlTextReaderConstString (xmlTextReader *reader, const xmlChar *str) |
| Get an interned string from the reader, allows for example to speedup string name comparisons. | |
| const xmlChar * | xmlTextReaderConstValue (xmlTextReader *reader) |
| Provides the text value of the node if present. | |
| xmlChar * | xmlTextReaderBaseUri (xmlTextReader *reader) |
| The base URI of the node. | |
| xmlChar * | xmlTextReaderLocalName (xmlTextReader *reader) |
| The local name of the node. | |
| xmlChar * | xmlTextReaderName (xmlTextReader *reader) |
| The qualified name of the node, equal to Prefix :LocalName. | |
| xmlChar * | xmlTextReaderNamespaceUri (xmlTextReader *reader) |
| The URI defining the namespace associated with the node. | |
| xmlChar * | xmlTextReaderPrefix (xmlTextReader *reader) |
| A shorthand reference to the namespace associated with the node. | |
| xmlChar * | xmlTextReaderXmlLang (xmlTextReader *reader) |
| The xml:lang scope within which the node resides. | |
| xmlChar * | xmlTextReaderValue (xmlTextReader *reader) |
| Provides the text value of the node if present. | |
| int | xmlTextReaderClose (xmlTextReader *reader) |
| This method releases any resources allocated by the current instance changes the state to Closed and close any underlying input. | |
| xmlChar * | xmlTextReaderGetAttributeNo (xmlTextReader *reader, int no) |
| Provides the value of the attribute with the specified index relative to the containing element. | |
| xmlChar * | xmlTextReaderGetAttribute (xmlTextReader *reader, const xmlChar *name) |
| Provides the value of the attribute with the specified qualified name. | |
| xmlChar * | xmlTextReaderGetAttributeNs (xmlTextReader *reader, const xmlChar *localName, const xmlChar *namespaceURI) |
| Provides the value of the specified attribute. | |
| xmlParserInputBuffer * | xmlTextReaderGetRemainder (xmlTextReader *reader) |
| Method to get the remainder of the buffered XML. | |
| xmlChar * | xmlTextReaderLookupNamespace (xmlTextReader *reader, const xmlChar *prefix) |
| Resolves a namespace prefix in the scope of the current element. | |
| int | xmlTextReaderMoveToAttributeNo (xmlTextReader *reader, int no) |
| Moves the position of the current instance to the attribute with the specified index relative to the containing element. | |
| int | xmlTextReaderMoveToAttribute (xmlTextReader *reader, const xmlChar *name) |
| Moves the position of the current instance to the attribute with the specified qualified name. | |
| int | xmlTextReaderMoveToAttributeNs (xmlTextReader *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. | |
| int | xmlTextReaderMoveToFirstAttribute (xmlTextReader *reader) |
| Moves the position of the current instance to the first attribute associated with the current node. | |
| int | xmlTextReaderMoveToNextAttribute (xmlTextReader *reader) |
| Moves the position of the current instance to the next attribute associated with the current node. | |
| int | xmlTextReaderMoveToElement (xmlTextReader *reader) |
| Moves the position of the current instance to the node that contains the current Attribute node. | |
| int | xmlTextReaderNormalization (xmlTextReader *reader) |
| The value indicating whether to normalize white space and attribute values. | |
| const xmlChar * | xmlTextReaderConstEncoding (xmlTextReader *reader) |
| Determine the encoding of the document being read. | |
| int | xmlTextReaderSetParserProp (xmlTextReader *reader, int prop, int value) |
| Change the parser processing behaviour by changing some of its internal properties. | |
| int | xmlTextReaderGetParserProp (xmlTextReader *reader, int prop) |
| Read the parser internal property. | |
| xmlNode * | xmlTextReaderCurrentNode (xmlTextReader *reader) |
| Hacking interface allowing to get the xmlNode corresponding to the current node being accessed by the xmlTextReader. | |
| int | xmlTextReaderGetParserLineNumber (xmlTextReader *reader) |
| Provide the line number of the current parsing point. | |
| int | xmlTextReaderGetParserColumnNumber (xmlTextReader *reader) |
| Provide the column number of the current parsing point. | |
| xmlNode * | xmlTextReaderPreserve (xmlTextReader *reader) |
| This tells the XML Reader to preserve the current node. | |
| int | xmlTextReaderPreservePattern (xmlTextReader *reader, const xmlChar *pattern, const xmlChar **namespaces) |
| This tells the XML Reader to preserve all nodes matched by the pattern. | |
| xmlDoc * | xmlTextReaderCurrentDoc (xmlTextReader *reader) |
| Hacking interface allowing to get the xmlDoc corresponding to the current document being accessed by the xmlTextReader. | |
| xmlNode * | xmlTextReaderExpand (xmlTextReader *reader) |
| Reads the contents of the current node and the full subtree. | |
| int | xmlTextReaderNext (xmlTextReader *reader) |
| Skip to the node following the current one in document order while avoiding the subtree if any. | |
| int | xmlTextReaderNextSibling (xmlTextReader *reader) |
| Skip to the node following the current one in document order while avoiding the subtree if any. | |
| int | xmlTextReaderIsValid (xmlTextReader *reader) |
| Retrieve the validity status from the parser context. | |
| int | xmlTextReaderRelaxNGValidate (xmlTextReader *reader, const char *rng) |
| Use RelaxNG schema to validate the document as it is processed. | |
| int | xmlTextReaderRelaxNGValidateCtxt (xmlTextReader *reader, xmlRelaxNGValidCtxt *ctxt, int options) |
| Use RelaxNG schema context to validate the document as it is processed. | |
| int | xmlTextReaderRelaxNGSetSchema (xmlTextReader *reader, xmlRelaxNG *schema) |
| Use RelaxNG to validate the document as it is processed. | |
| int | xmlTextReaderSchemaValidate (xmlTextReader *reader, const char *xsd) |
| Use W3C XSD schema to validate the document as it is processed. | |
| int | xmlTextReaderSchemaValidateCtxt (xmlTextReader *reader, xmlSchemaValidCtxt *ctxt, int options) |
| Use W3C XSD schema context to validate the document as it is processed. | |
| int | xmlTextReaderSetSchema (xmlTextReader *reader, xmlSchema *schema) |
| Use XSD Schema to validate the document as it is processed. | |
| const xmlChar * | xmlTextReaderConstXmlVersion (xmlTextReader *reader) |
| Determine the XML version of the document being read. | |
| int | xmlTextReaderStandalone (xmlTextReader *reader) |
| Determine the standalone status of the document being read. | |
| long | xmlTextReaderByteConsumed (xmlTextReader *reader) |
| This function provides the current index of the parser used by the reader, relative to the start of the current entity. | |
| xmlTextReader * | xmlReaderWalker (xmlDoc *doc) |
| Create an xmltextReader for a preparsed document. | |
| xmlTextReader * | xmlReaderForDoc (const xmlChar *cur, const char *URL, const char *encoding, int options) |
| Create an xmltextReader for an XML in-memory document. | |
| xmlTextReader * | xmlReaderForFile (const char *filename, const char *encoding, int options) |
| parse an XML file from the filesystem or the network. | |
| xmlTextReader * | xmlReaderForMemory (const char *buffer, int size, const char *URL, const char *encoding, int options) |
| Create an xmltextReader for an XML in-memory document. | |
| xmlTextReader * | xmlReaderForFd (int fd, const char *URL, const char *encoding, int options) |
| Create an xmltextReader for an XML from a file descriptor. | |
| xmlTextReader * | 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. | |
| int | xmlReaderNewWalker (xmlTextReader *reader, xmlDoc *doc) |
| Setup an xmltextReader to parse a preparsed XML document. | |
| int | xmlReaderNewDoc (xmlTextReader *reader, const xmlChar *cur, const char *URL, const char *encoding, int options) |
| Setup an xmltextReader to parse an XML in-memory document. | |
| int | xmlReaderNewFile (xmlTextReader *reader, const char *filename, const char *encoding, int options) |
| parse an XML file from the filesystem or the network. | |
| int | xmlReaderNewMemory (xmlTextReader *reader, const char *buffer, int size, const char *URL, const char *encoding, int options) |
| Setup an xmltextReader to parse an XML in-memory document. | |
| int | xmlReaderNewFd (xmlTextReader *reader, int fd, const char *URL, const char *encoding, int options) |
| Setup an xmltextReader to parse an XML from a file descriptor. | |
| int | xmlReaderNewIO (xmlTextReader *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. | |
| int | xmlTextReaderLocatorLineNumber (xmlTextReaderLocatorPtr locator) |
| Obtain the line number for the given locator. | |
| xmlChar * | xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator) |
| Obtain the base URI for the given locator. | |
| void | xmlTextReaderSetErrorHandler (xmlTextReader *reader, xmlTextReaderErrorFunc f, void *arg) |
| Register a callback function that will be called on error and warnings. | |
| void | xmlTextReaderSetStructuredErrorHandler (xmlTextReader *reader, xmlStructuredErrorFunc f, void *arg) |
| xmlTextReaderSetStructuredErrorHandler: | |
| void | xmlTextReaderGetErrorHandler (xmlTextReader *reader, xmlTextReaderErrorFunc *f, void **arg) |
| Retrieve the error callback function and user argument. | |
| void | xmlTextReaderSetResourceLoader (xmlTextReader *reader, xmlResourceLoader loader, void *data) |
| Register a callback function that will be called to load external resources like entities. | |
the XMLReader implementation
API of the XML streaming API based on C# interfaces.
| typedef void(* xmlTextReaderErrorFunc) (void *arg, const char *msg, xmlParserSeverities severity, xmlTextReaderLocatorPtr locator) |
Signature of an error callback from a reader parser.
| arg | the user argument |
| msg | the message |
| severity | the severity of the error |
| locator | a locator indicating where the error occurred |
| enum xmlReaderTypes |
Predefined constants for the different types of nodes.
| void xmlFreeTextReader | ( | xmlTextReader * | reader | ) |
Deallocate all the resources associated to the reader.
| reader | the xmlTextReader |
| xmlTextReader * xmlNewTextReader | ( | xmlParserInputBuffer * | input, |
| const char * | URI ) |
Create an xmlTextReader structure fed with input
| input | the xmlParserInputBuffer used to read data |
| URI | the URI information for the source if available |
| xmlTextReader * xmlNewTextReaderFilename | ( | const char * | URI | ) |
Create an xmlTextReader structure fed with the resource at URI
| URI | the URI of the resource to process |
| xmlTextReader * 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 |
| xmlTextReader * 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 |
| xmlTextReader * 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 |
| xmlTextReader * 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 |
| xmlTextReader * 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 |
| int xmlReaderNewDoc | ( | xmlTextReader * | 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 |
| int xmlReaderNewFd | ( | xmlTextReader * | 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 |
| int xmlReaderNewFile | ( | xmlTextReader * | 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 |
| int xmlReaderNewIO | ( | xmlTextReader * | 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 |
| int xmlReaderNewMemory | ( | xmlTextReader * | 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 |
| int xmlReaderNewWalker | ( | xmlTextReader * | reader, |
| xmlDoc * | doc ) |
Setup an xmltextReader to parse a preparsed XML document.
This reuses the existing reader xmlTextReader.
| reader | an XML reader |
| doc | a preparsed document |
| xmlTextReader * xmlReaderWalker | ( | xmlDoc * | doc | ) |
Create an xmltextReader for a preparsed document.
| doc | a preparsed document |
| int xmlTextReaderAttributeCount | ( | xmlTextReader * | reader | ) |
Provides the number of attributes of the current node.
| reader | the xmlTextReader used |
| xmlChar * xmlTextReaderBaseUri | ( | xmlTextReader * | reader | ) |
The base URI of the node.
| reader | the xmlTextReader used |
| long xmlTextReaderByteConsumed | ( | xmlTextReader * | 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 xmlByteConsumed for the parser context associated with the reader. See xmlByteConsumed for more information.
| reader | an XML reader |
| int xmlTextReaderClose | ( | xmlTextReader * | reader | ) |
This method releases any resources allocated by the current instance changes the state to Closed and close any underlying input.
| reader | the xmlTextReader used |
| const xmlChar * xmlTextReaderConstBaseUri | ( | xmlTextReader * | reader | ) |
The base URI of the node.
| reader | the xmlTextReader used |
| const xmlChar * xmlTextReaderConstEncoding | ( | xmlTextReader * | reader | ) |
Determine the encoding of the document being read.
| reader | the xmlTextReader used |
| const xmlChar * xmlTextReaderConstLocalName | ( | xmlTextReader * | reader | ) |
The local name of the node.
| reader | the xmlTextReader used |
| const xmlChar * xmlTextReaderConstName | ( | xmlTextReader * | reader | ) |
The qualified name of the node, equal to Prefix :LocalName.
| reader | the xmlTextReader used |
| const xmlChar * xmlTextReaderConstNamespaceUri | ( | xmlTextReader * | reader | ) |
The URI defining the namespace associated with the node.
| reader | the xmlTextReader used |
| const xmlChar * xmlTextReaderConstPrefix | ( | xmlTextReader * | reader | ) |
A shorthand reference to the namespace associated with the node.
| reader | the xmlTextReader used |
| const xmlChar * xmlTextReaderConstString | ( | xmlTextReader * | reader, |
| const xmlChar * | str ) |
Get an interned string from the reader, allows for example to speedup string name comparisons.
| reader | the xmlTextReader used |
| str | the string to intern. |
| const xmlChar * xmlTextReaderConstValue | ( | xmlTextReader * | reader | ) |
Provides the text value of the node if present.
| reader | the xmlTextReader used |
| const xmlChar * xmlTextReaderConstXmlLang | ( | xmlTextReader * | reader | ) |
The xml:lang scope within which the node resides.
| reader | the xmlTextReader used |
| const xmlChar * xmlTextReaderConstXmlVersion | ( | xmlTextReader * | reader | ) |
Determine the XML version of the document being read.
| reader | the xmlTextReader used |
| xmlDoc * xmlTextReaderCurrentDoc | ( | xmlTextReader * | reader | ) |
Hacking interface allowing to get the xmlDoc corresponding 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.
| reader | the xmlTextReader used |
| xmlNode * xmlTextReaderCurrentNode | ( | xmlTextReader * | reader | ) |
Hacking interface allowing to get the xmlNode corresponding to the current node being accessed by the xmlTextReader.
This is dangerous because the underlying node may be destroyed on the next Reads.
| reader | the xmlTextReader used |
| int xmlTextReaderDepth | ( | xmlTextReader * | reader | ) |
The depth of the node in the tree.
| reader | the xmlTextReader used |
| xmlNode * xmlTextReaderExpand | ( | xmlTextReader * | 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 xmlTextReader used |
| xmlChar * xmlTextReaderGetAttribute | ( | xmlTextReader * | reader, |
| const xmlChar * | name ) |
Provides the value of the attribute with the specified qualified name.
| reader | the xmlTextReader used |
| name | the qualified name of the attribute. |
| xmlChar * xmlTextReaderGetAttributeNo | ( | xmlTextReader * | reader, |
| int | no ) |
Provides the value of the attribute with the specified index relative to the containing element.
| reader | the xmlTextReader used |
| no | the zero-based index of the attribute relative to the containing element |
| xmlChar * xmlTextReaderGetAttributeNs | ( | xmlTextReader * | reader, |
| const xmlChar * | localName, | ||
| const xmlChar * | namespaceURI ) |
Provides the value of the specified attribute.
| reader | the xmlTextReader used |
| localName | the local name of the attribute. |
| namespaceURI | the namespace URI of the attribute. |
| void xmlTextReaderGetErrorHandler | ( | xmlTextReader * | reader, |
| xmlTextReaderErrorFunc * | f, | ||
| void ** | arg ) |
Retrieve the error callback function and user argument.
| reader | the xmlTextReader used |
| f | the callback function or NULL is no callback has been registered |
| arg | a user argument |
| const xmlError * xmlTextReaderGetLastError | ( | xmlTextReader * | reader | ) |
| reader | an XML reader |
| int xmlTextReaderGetParserColumnNumber | ( | xmlTextReader * | reader | ) |
Provide the column number of the current parsing point.
| reader | the user data (XML reader context) |
| int xmlTextReaderGetParserLineNumber | ( | xmlTextReader * | reader | ) |
Provide the line number of the current parsing point.
| reader | the user data (XML reader context) |
| int xmlTextReaderGetParserProp | ( | xmlTextReader * | reader, |
| int | prop ) |
Read the parser internal property.
| reader | the xmlTextReader used |
| prop | the xmlParserProperties to get |
| xmlParserInputBuffer * xmlTextReaderGetRemainder | ( | xmlTextReader * | 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 progressed past what's left in reader->input, and there is an allocation problem. Best would be to rewrite it differently.
| reader | the xmlTextReader used |
| int xmlTextReaderHasAttributes | ( | xmlTextReader * | reader | ) |
Whether the node has attributes.
| reader | the xmlTextReader used |
| int xmlTextReaderHasValue | ( | xmlTextReader * | reader | ) |
Whether the node can have a text value.
| reader | the xmlTextReader used |
| int xmlTextReaderIsDefault | ( | xmlTextReader * | reader | ) |
Whether an Attribute node was generated from the default value defined in the DTD or schema.
| reader | the xmlTextReader used |
| int xmlTextReaderIsEmptyElement | ( | xmlTextReader * | reader | ) |
Check if the current node is empty.
| reader | the xmlTextReader used |
| int xmlTextReaderIsNamespaceDecl | ( | xmlTextReader * | reader | ) |
Determine whether the current node is a namespace declaration rather than a regular attribute.
| reader | the xmlTextReader used |
| int xmlTextReaderIsValid | ( | xmlTextReader * | reader | ) |
Retrieve the validity status from the parser context.
| reader | the xmlTextReader used |
| xmlChar * xmlTextReaderLocalName | ( | xmlTextReader * | reader | ) |
The local name of the node.
| reader | the xmlTextReader used |
| xmlChar * xmlTextReaderLocatorBaseURI | ( | xmlTextReaderLocatorPtr | locator | ) |
Obtain the base URI for the given locator.
| locator | the void used |
| int xmlTextReaderLocatorLineNumber | ( | xmlTextReaderLocatorPtr | locator | ) |
Obtain the line number for the given locator.
| locator | the void used |
| xmlChar * xmlTextReaderLookupNamespace | ( | xmlTextReader * | reader, |
| const xmlChar * | prefix ) |
Resolves a namespace prefix in the scope of the current element.
| reader | the xmlTextReader used |
| prefix | the prefix whose namespace URI is to be resolved. To return the default namespace, specify NULL |
| int xmlTextReaderMoveToAttribute | ( | xmlTextReader * | reader, |
| const xmlChar * | name ) |
Moves the position of the current instance to the attribute with the specified qualified name.
| reader | the xmlTextReader used |
| name | the qualified name of the attribute. |
| int xmlTextReaderMoveToAttributeNo | ( | xmlTextReader * | reader, |
| int | no ) |
Moves the position of the current instance to the attribute with the specified index relative to the containing element.
| reader | the xmlTextReader used |
| no | the zero-based index of the attribute relative to the containing element. |
| int xmlTextReaderMoveToAttributeNs | ( | xmlTextReader * | 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 xmlTextReader used |
| localName | the local name of the attribute. |
| namespaceURI | the namespace URI of the attribute. |
| int xmlTextReaderMoveToElement | ( | xmlTextReader * | reader | ) |
Moves the position of the current instance to the node that contains the current Attribute node.
| reader | the xmlTextReader used |
| int xmlTextReaderMoveToFirstAttribute | ( | xmlTextReader * | reader | ) |
Moves the position of the current instance to the first attribute associated with the current node.
| reader | the xmlTextReader used |
| int xmlTextReaderMoveToNextAttribute | ( | xmlTextReader * | reader | ) |
Moves the position of the current instance to the next attribute associated with the current node.
| reader | the xmlTextReader used |
| xmlChar * xmlTextReaderName | ( | xmlTextReader * | reader | ) |
The qualified name of the node, equal to Prefix :LocalName.
| reader | the xmlTextReader used |
| xmlChar * xmlTextReaderNamespaceUri | ( | xmlTextReader * | reader | ) |
The URI defining the namespace associated with the node.
| reader | the xmlTextReader used |
| int xmlTextReaderNext | ( | xmlTextReader * | reader | ) |
Skip to the node following the current one in document order while avoiding the subtree if any.
| reader | the xmlTextReader used |
| int xmlTextReaderNextSibling | ( | xmlTextReader * | 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 xmlTextReader used |
| int xmlTextReaderNodeType | ( | xmlTextReader * | reader | ) |
Get the node type of the current node Reference: http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/XmlNodeType.html.
| reader | the xmlTextReader used |
| int xmlTextReaderNormalization | ( | xmlTextReader * | 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 behaviour of accepting out of range character entities like � is of course not supported either.
| reader | the xmlTextReader used |
| xmlChar * xmlTextReaderPrefix | ( | xmlTextReader * | reader | ) |
A shorthand reference to the namespace associated with the node.
| reader | the xmlTextReader used |
| xmlNode * xmlTextReaderPreserve | ( | xmlTextReader * | 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
| reader | the xmlTextReader used |
| int xmlTextReaderPreservePattern | ( | xmlTextReader * | 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 xmlTextReader used |
| pattern | an XPath subset pattern |
| namespaces | the prefix definitions, array of [URI, prefix] or NULL |
| int xmlTextReaderQuoteChar | ( | xmlTextReader * | reader | ) |
The quotation mark character used to enclose the value of an attribute.
| reader | the xmlTextReader used |
| int xmlTextReaderRead | ( | xmlTextReader * | reader | ) |
Moves the position of the current instance to the next node in the stream, exposing its properties.
| reader | the xmlTextReader used |
| int xmlTextReaderReadAttributeValue | ( | xmlTextReader * | reader | ) |
Parses an attribute value into one or more Text and EntityReference nodes.
| reader | the xmlTextReader used |
| xmlChar * xmlTextReaderReadInnerXml | ( | xmlTextReader * | reader | ) |
Reads the contents of the current node, including child nodes and markup.
| reader | the xmlTextReader used |
| xmlChar * xmlTextReaderReadOuterXml | ( | xmlTextReader * | reader | ) |
Reads the contents of the current node, including child nodes and markup.
| reader | the xmlTextReader used |
| int xmlTextReaderReadState | ( | xmlTextReader * | reader | ) |
Gets the read state of the reader.
| reader | the xmlTextReader used |
| xmlChar * xmlTextReaderReadString | ( | xmlTextReader * | reader | ) |
Reads the contents of an element or a text node as a string.
| reader | the xmlTextReader used |
| int xmlTextReaderRelaxNGSetSchema | ( | xmlTextReader * | reader, |
| xmlRelaxNG * | 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 deactivated. The schema should not be freed until the reader is deallocated or its use has been deactivated.
| reader | the xmlTextReader used |
| schema | a precompiled RelaxNG schema |
| int xmlTextReaderRelaxNGValidate | ( | xmlTextReader * | reader, |
| const char * | rng ) |
Use RelaxNG schema to validate the document as it is processed.
Activation is only possible before the first Read(). If rng is NULL, then RelaxNG schema validation is deactivated.
| reader | the xmlTextReader used |
| rng | the path to a RelaxNG schema or NULL |
| int xmlTextReaderRelaxNGValidateCtxt | ( | xmlTextReader * | reader, |
| xmlRelaxNGValidCtxt * | ctxt, | ||
| int | options ) |
Use RelaxNG schema context to validate the document as it is processed.
Activation is only possible before the first Read(). If ctxt is NULL, then RelaxNG schema validation is deactivated.
| reader | the xmlTextReader used |
| ctxt | the RelaxNG schema validation context or NULL |
| options | options (not used yet) |
| int xmlTextReaderSchemaValidate | ( | xmlTextReader * | 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 xmlTextReader used |
| xsd | the path to a W3C XSD schema or NULL |
| int xmlTextReaderSchemaValidateCtxt | ( | xmlTextReader * | reader, |
| xmlSchemaValidCtxt * | 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 xmlTextReader used |
| ctxt | the XML Schema validation context or NULL |
| options | options (not used yet) |
| void xmlTextReaderSetErrorHandler | ( | xmlTextReader * | 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 xmlTextReader used |
| f | the callback function to call on error and warnings |
| arg | a user argument to pass to the callback function |
| void xmlTextReaderSetMaxAmplification | ( | xmlTextReader * | reader, |
| unsigned | maxAmpl ) |
Set the maximum amplification factor.
See xmlCtxtSetMaxAmplification.
| reader | an XML reader |
| maxAmpl | maximum amplification factor |
| int xmlTextReaderSetParserProp | ( | xmlTextReader * | 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.
| reader | the xmlTextReader used |
| prop | the xmlParserProperties to set |
| value | usually 0 or 1 to (de)activate it |
| void xmlTextReaderSetResourceLoader | ( | xmlTextReader * | reader, |
| xmlResourceLoader | loader, | ||
| void * | data ) |
Register a callback function that will be called to load external resources like entities.
| reader | thr reader |
| loader | resource loader |
| data | user data which will be passed to the loader |
| int xmlTextReaderSetSchema | ( | xmlTextReader * | reader, |
| xmlSchema * | 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 deactivated. The schema should not be freed until the reader is deallocated or its use has been deactivated.
| reader | the xmlTextReader used |
| schema | a precompiled Schema schema |
| void xmlTextReaderSetStructuredErrorHandler | ( | xmlTextReader * | reader, |
| xmlStructuredErrorFunc | f, | ||
| void * | arg ) |
xmlTextReaderSetStructuredErrorHandler:
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 xmlTextReader used |
| f | the callback function to call on error and warnings |
| arg | a user argument to pass to the callback function |
| int xmlTextReaderSetup | ( | xmlTextReader * | reader, |
| xmlParserInputBuffer * | input, | ||
| const char * | URL, | ||
| const char * | encoding, | ||
| int | options ) |
Setup an XML reader with new options.
| reader | an XML reader |
| input | xmlParserInputBuffer used to feed the reader, will be destroyed with it. |
| URL | the base URL to use for the document |
| encoding | the document encoding, or NULL |
| options | a combination of xmlParserOption |
| int xmlTextReaderStandalone | ( | xmlTextReader * | reader | ) |
Determine the standalone status of the document being read.
| reader | the xmlTextReader used |
| xmlChar * xmlTextReaderValue | ( | xmlTextReader * | reader | ) |
Provides the text value of the node if present.
| reader | the xmlTextReader used |
| xmlChar * xmlTextReaderXmlLang | ( | xmlTextReader * | reader | ) |
The xml:lang scope within which the node resides.
| reader | the xmlTextReader used |