|
Packit |
423ecb |
|
|
Packit |
423ecb |
<html>
|
|
Packit |
423ecb |
<head>
|
|
Packit |
423ecb |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
Packit |
423ecb |
<title>xmlreader: the XMLReader implementation</title>
|
|
Packit |
423ecb |
<meta name="generator" content="Libxml2 devhelp stylesheet"/>
|
|
Packit |
423ecb |
<link rel="start" href="index.html" title="libxml2 Reference Manual"/>
|
|
Packit |
423ecb |
<link rel="up" href="general.html" title="API"/>
|
|
Packit |
423ecb |
<link rel="stylesheet" href="style.css" type="text/css"/>
|
|
Packit |
423ecb |
<link rel="chapter" href="general.html" title="API"/>
|
|
Packit |
423ecb |
</head>
|
|
Packit |
423ecb |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
libxml2 Reference Manual
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
xmlreader
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
xmlreader - the XMLReader implementation
|
|
Packit |
423ecb |
API of the XML streaming API based on C# interfaces.
|
|
Packit |
423ecb |
Author(s): Daniel Veillard
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Synopsis
|
|
Packit |
423ecb |
typedef xmlTextReader * xmlTextReaderPtr;
|
|
Packit |
423ecb |
typedef enum xmlParserSeverities;
|
|
Packit |
423ecb |
typedef enum xmlParserProperties;
|
|
Packit |
423ecb |
typedef enum xmlTextReaderMode;
|
|
Packit |
423ecb |
typedef struct _xmlTextReader xmlTextReader;
|
|
Packit |
423ecb |
typedef void * xmlTextReaderLocatorPtr;
|
|
Packit |
423ecb |
typedef enum xmlReaderTypes;
|
|
Packit |
423ecb |
xmlTextReaderPtr xmlNewTextReaderFilename (const char * URI);
|
|
Packit |
423ecb |
int xmlTextReaderHasAttributes (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderReadState (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlTextReaderPtr xmlReaderForFile (const char * filename, const char * encoding, int options);
|
|
Packit |
423ecb |
const xmlChar * xmlTextReaderConstNamespaceUri (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlDocPtr xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderGetParserLineNumber (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlNodePtr xmlTextReaderExpand (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderXmlLang (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlTextReaderPtr xmlReaderForDoc (const xmlChar * cur, const char * URL, const char * encoding, int options);
|
|
Packit |
423ecb |
int xmlReaderNewIO (xmlTextReaderPtr reader, xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void * ioctx, const char * URL, const char * encoding, int options);
|
|
Packit |
423ecb |
int xmlTextReaderClose (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderReadInnerXml (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
const xmlChar * xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderNormalization (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderGetParserProp (xmlTextReaderPtr reader, int prop);
|
|
Packit |
423ecb |
int xmlTextReaderMoveToAttribute (xmlTextReaderPtr reader, const xmlChar * name);
|
|
Packit |
423ecb |
int xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderSetSchema (xmlTextReaderPtr reader, xmlSchemaPtr schema);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderValue (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderIsValid (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderMoveToFirstAttribute (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderGetParserColumnNumber (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
const xmlChar * xmlTextReaderConstValue (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlTextReaderPtr xmlNewTextReader (xmlParserInputBufferPtr input, const char * URI);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader, int no);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader, const xmlChar * localName, const xmlChar * namespaceURI);
|
|
Packit |
423ecb |
const xmlChar * xmlTextReaderConstName (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
const xmlChar * xmlTextReaderConstString (xmlTextReaderPtr reader, const xmlChar * str);
|
|
Packit |
423ecb |
const xmlChar * xmlTextReaderConstXmlVersion (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderDepth (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderReadString (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderIsDefault (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderMoveToNextAttribute (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlReaderNewWalker (xmlTextReaderPtr reader, xmlDocPtr doc);
|
|
Packit |
423ecb |
const xmlChar * xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlTextReaderPtr xmlReaderWalker (xmlDocPtr doc);
|
|
Packit |
423ecb |
const xmlChar * xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderNodeType (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
void xmlFreeTextReader (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderName (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderRead (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderIsEmptyElement (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlReaderNewMemory (xmlTextReaderPtr reader, const char * buffer, int size, const char * URL, const char * encoding, int options);
|
|
Packit |
423ecb |
int xmlTextReaderSchemaValidateCtxt (xmlTextReaderPtr reader, xmlSchemaValidCtxtPtr ctxt, int options);
|
|
Packit |
423ecb |
int xmlTextReaderHasValue (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
const xmlChar * xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderBaseUri (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderMoveToAttributeNo (xmlTextReaderPtr reader, int no);
|
|
Packit |
423ecb |
int xmlTextReaderLocatorLineNumber (xmlTextReaderLocatorPtr locator);
|
|
Packit |
423ecb |
int xmlTextReaderMoveToAttributeNs (xmlTextReaderPtr reader, const xmlChar * localName, const xmlChar * namespaceURI);
|
|
Packit |
423ecb |
int xmlTextReaderNext (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderAttributeCount (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderLookupNamespace (xmlTextReaderPtr reader, const xmlChar * prefix);
|
|
Packit |
423ecb |
int xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlTextReaderPtr xmlReaderForIO (xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void * ioctx, const char * URL, const char * encoding, int options);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderReadOuterXml (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderRelaxNGValidateCtxt (xmlTextReaderPtr reader, xmlRelaxNGValidCtxtPtr ctxt, int options);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderPrefix (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderReadAttributeValue (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderNextSibling (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
typedef void xmlTextReaderErrorFunc (void * arg, const char * msg, xmlParserSeverities severity, xmlTextReaderLocatorPtr locator);
|
|
Packit |
423ecb |
xmlTextReaderPtr xmlReaderForFd (int fd, const char * URL, const char * encoding, int options);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderGetAttribute (xmlTextReaderPtr reader, const xmlChar * name);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderLocalName (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlNodePtr xmlTextReaderPreserve (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlNodePtr xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderSetParserProp (xmlTextReaderPtr reader, int prop, int value);
|
|
Packit |
423ecb |
xmlParserInputBufferPtr xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
void xmlTextReaderSetErrorHandler (xmlTextReaderPtr reader, xmlTextReaderErrorFunc f, void * arg);
|
|
Packit |
423ecb |
int xmlTextReaderIsNamespaceDecl (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlReaderNewDoc (xmlTextReaderPtr reader, const xmlChar * cur, const char * URL, const char * encoding, int options);
|
|
Packit |
423ecb |
int xmlTextReaderPreservePattern (xmlTextReaderPtr reader, const xmlChar * pattern, const xmlChar ** namespaces);
|
|
Packit |
423ecb |
const xmlChar * xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
void xmlTextReaderGetErrorHandler (xmlTextReaderPtr reader, xmlTextReaderErrorFunc * f, void ** arg);
|
|
Packit |
423ecb |
void xmlTextReaderSetStructuredErrorHandler (xmlTextReaderPtr reader, xmlStructuredErrorFunc f, void * arg);
|
|
Packit |
423ecb |
int xmlReaderNewFile (xmlTextReaderPtr reader, const char * filename, const char * encoding, int options);
|
|
Packit |
423ecb |
int xmlTextReaderRelaxNGSetSchema (xmlTextReaderPtr reader, xmlRelaxNGPtr schema);
|
|
Packit |
423ecb |
int xmlReaderNewFd (xmlTextReaderPtr reader, int fd, const char * URL, const char * encoding, int options);
|
|
Packit |
423ecb |
int xmlTextReaderRelaxNGValidate (xmlTextReaderPtr reader, const char * rng);
|
|
Packit |
423ecb |
xmlTextReaderPtr xmlReaderForMemory (const char * buffer, int size, const char * URL, const char * encoding, int options);
|
|
Packit |
423ecb |
int xmlTextReaderSetup (xmlTextReaderPtr reader, xmlParserInputBufferPtr input, const char * URL, const char * encoding, int options);
|
|
Packit |
423ecb |
long xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
|
|
Packit |
423ecb |
xmlChar * xmlTextReaderNamespaceUri (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
int xmlTextReaderSchemaValidate (xmlTextReaderPtr reader, const char * xsd);
|
|
Packit |
423ecb |
int xmlTextReaderStandalone (xmlTextReaderPtr reader);
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Description
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Details
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
XML_PARSER_LOADDTD = 1
|
|
Packit |
423ecb |
XML_PARSER_DEFAULTATTRS = 2
|
|
Packit |
423ecb |
XML_PARSER_VALIDATE = 3
|
|
Packit |
423ecb |
XML_PARSER_SUBST_ENTITIES = 4
|
|
Packit |
423ecb |
};
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
XML_PARSER_SEVERITY_VALIDITY_WARNING = 1
|
|
Packit |
423ecb |
XML_PARSER_SEVERITY_VALIDITY_ERROR = 2
|
|
Packit |
423ecb |
XML_PARSER_SEVERITY_WARNING = 3
|
|
Packit |
423ecb |
XML_PARSER_SEVERITY_ERROR = 4
|
|
Packit |
423ecb |
};
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
XML_READER_TYPE_NONE = 0
|
|
Packit |
423ecb |
XML_READER_TYPE_ELEMENT = 1
|
|
Packit |
423ecb |
XML_READER_TYPE_ATTRIBUTE = 2
|
|
Packit |
423ecb |
XML_READER_TYPE_TEXT = 3
|
|
Packit |
423ecb |
XML_READER_TYPE_CDATA = 4
|
|
Packit |
423ecb |
XML_READER_TYPE_ENTITY_REFERENCE = 5
|
|
Packit |
423ecb |
XML_READER_TYPE_ENTITY = 6
|
|
Packit |
423ecb |
XML_READER_TYPE_PROCESSING_INSTRUCTION = 7
|
|
Packit |
423ecb |
XML_READER_TYPE_COMMENT = 8
|
|
Packit |
423ecb |
XML_READER_TYPE_DOCUMENT = 9
|
|
Packit |
423ecb |
XML_READER_TYPE_DOCUMENT_TYPE = 10
|
|
Packit |
423ecb |
XML_READER_TYPE_DOCUMENT_FRAGMENT = 11
|
|
Packit |
423ecb |
XML_READER_TYPE_NOTATION = 12
|
|
Packit |
423ecb |
XML_READER_TYPE_WHITESPACE = 13
|
|
Packit |
423ecb |
XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14
|
|
Packit |
423ecb |
XML_READER_TYPE_END_ELEMENT = 15
|
|
Packit |
423ecb |
XML_READER_TYPE_END_ENTITY = 16
|
|
Packit |
423ecb |
XML_READER_TYPE_XML_DECLARATION = 17
|
|
Packit |
423ecb |
};
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The content of this structure is not made public by the API.
|
|
Packit |
423ecb |
} xmlTextReader;
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Typedef xmlTextReaderLocatorPtrvoid * xmlTextReaderLocatorPtr;
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
XML_TEXTREADER_MODE_INITIAL = 0
|
|
Packit |
423ecb |
XML_TEXTREADER_MODE_INTERACTIVE = 1
|
|
Packit |
423ecb |
XML_TEXTREADER_MODE_ERROR = 2
|
|
Packit |
423ecb |
XML_TEXTREADER_MODE_EOF = 3
|
|
Packit |
423ecb |
XML_TEXTREADER_MODE_CLOSED = 4
|
|
Packit |
423ecb |
XML_TEXTREADER_MODE_READING = 5
|
|
Packit |
423ecb |
};
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Pointer to an xmlReader context.
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Signature of an error callback from a reader parser
|
|
Packit |
423ecb |
<tt>arg</tt>: | the user argument | <tt>msg</tt>: | the message | <tt>severity</tt>: | the severity of the error | <tt>locator</tt>: | a locator indicating where the error occurred |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Deallocate all the resources associated to the reader
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Create an xmlTextReader structure fed with @input
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Create an xmlTextReader structure fed with the resource at @URI
|
|
Packit |
423ecb |
<tt>URI</tt>: | the URI of the resource to process | <tt>Returns</tt>: | the new xmlTextReaderPtr or NULL in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Create an xmltextReader for an XML in-memory document. The parsing flags @options are a combination of xmlParserOption.
|
|
Packit |
423ecb |
<tt>cur</tt>: | a pointer to a zero terminated string | <tt>URL</tt>: | the base URL to use for the document | <tt>encoding</tt>: | the document encoding, or NULL | <tt>options</tt>: | a combination of xmlParserOption | <tt>Returns</tt>: | the new reader or NULL in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
xmlTextReaderPtr xmlReaderForFd (int fd, const char * URL, const char * encoding, int options)
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>fd</tt>: | an open file descriptor | <tt>URL</tt>: | the base URL to use for the document | <tt>encoding</tt>: | the document encoding, or NULL | <tt>options</tt>: | a combination of xmlParserOption | <tt>Returns</tt>: | the new reader or NULL in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
xmlTextReaderPtr xmlReaderForFile (const char * filename, const char * encoding, int options)
|
|
Packit |
423ecb |
parse an XML file from the filesystem or the network. The parsing flags @options are a combination of xmlParserOption.
|
|
Packit |
423ecb |
<tt>filename</tt>: | a file or URL | <tt>encoding</tt>: | the document encoding, or NULL | <tt>options</tt>: | a combination of xmlParserOption | <tt>Returns</tt>: | the new reader or NULL in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Create an xmltextReader for an XML document from I/O functions and source. The parsing flags @options are a combination of xmlParserOption.
|
|
Packit |
423ecb |
<tt>ioread</tt>: | an I/O read function | <tt>ioclose</tt>: | an I/O close function | <tt>ioctx</tt>: | an I/O handler | <tt>URL</tt>: | the base URL to use for the document | <tt>encoding</tt>: | the document encoding, or NULL | <tt>options</tt>: | a combination of xmlParserOption | <tt>Returns</tt>: | the new reader or NULL in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
xmlTextReaderPtr xmlReaderForMemory (const char * buffer, int size, const char * URL, const char * encoding, int options)
|
|
Packit |
423ecb |
Create an xmltextReader for an XML in-memory document. The parsing flags @options are a combination of xmlParserOption.
|
|
Packit |
423ecb |
<tt>buffer</tt>: | a pointer to a char array | <tt>size</tt>: | the size of the array | <tt>URL</tt>: | the base URL to use for the document | <tt>encoding</tt>: | the document encoding, or NULL | <tt>options</tt>: | a combination of xmlParserOption | <tt>Returns</tt>: | the new reader or NULL in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | an XML reader | <tt>cur</tt>: | a pointer to a zero terminated string | <tt>URL</tt>: | the base URL to use for the document | <tt>encoding</tt>: | the document encoding, or NULL | <tt>options</tt>: | a combination of xmlParserOption | <tt>Returns</tt>: | 0 in case of success and -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | an XML reader | <tt>fd</tt>: | an open file descriptor | <tt>URL</tt>: | the base URL to use for the document | <tt>encoding</tt>: | the document encoding, or NULL | <tt>options</tt>: | a combination of xmlParserOption | <tt>Returns</tt>: | 0 in case of success and -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | an XML reader | <tt>filename</tt>: | a file or URL | <tt>encoding</tt>: | the document encoding, or NULL | <tt>options</tt>: | a combination of xmlParserOption | <tt>Returns</tt>: | 0 in case of success and -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | an XML reader | <tt>ioread</tt>: | an I/O read function | <tt>ioclose</tt>: | an I/O close function | <tt>ioctx</tt>: | an I/O handler | <tt>URL</tt>: | the base URL to use for the document | <tt>encoding</tt>: | the document encoding, or NULL | <tt>options</tt>: | a combination of xmlParserOption | <tt>Returns</tt>: | 0 in case of success and -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | an XML reader | <tt>buffer</tt>: | a pointer to a char array | <tt>size</tt>: | the size of the array | <tt>URL</tt>: | the base URL to use for the document | <tt>encoding</tt>: | the document encoding, or NULL | <tt>options</tt>: | a combination of xmlParserOption | <tt>Returns</tt>: | 0 in case of success and -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Setup an xmltextReader to parse a preparsed XML document. This reuses the existing @reader xmlTextReader.
|
|
Packit |
423ecb |
<tt>reader</tt>: | an XML reader | <tt>doc</tt>: | a preparsed document | <tt>Returns</tt>: | 0 in case of success and -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Create an xmltextReader for a preparsed document.
|
|
Packit |
423ecb |
<tt>doc</tt>: | a preparsed document | <tt>Returns</tt>: | the new reader or NULL in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Provides the number of attributes of the current node
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The base URI of the node.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the base URI or NULL if not available, if non NULL it need to be freed by the caller. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | an XML reader | <tt>Returns</tt>: | the index in bytes from the beginning of the entity or -1 in case the index could not be computed. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
This method releases any resources allocated by the current instance changes the state to Closed and close any underlying input.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 0 or -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The base URI of the node.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the base URI or NULL if not available, the string will be deallocated with the reader |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Determine the encoding of the document being read.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | a string containing the encoding of the document or NULL in case of error. The string is deallocated with the reader. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The local name of the node.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the local name or NULL if not available, the string will be deallocated with the reader. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The qualified name of the node, equal to Prefix :LocalName.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the local name or NULL if not available, the string is deallocated with the reader. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The URI defining the namespace associated with the node.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the namespace URI or NULL if not available, the string will be deallocated with the reader |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
A shorthand reference to the namespace associated with the node.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the prefix or NULL if not available, the string is deallocated with the reader. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Get an interned string from the reader, allows for example to speedup string name comparisons
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>str</tt>: | the string to intern. | <tt>Returns</tt>: | an interned copy of the string or NULL in case of error. The string will be deallocated with the reader. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Provides the text value of the node if present
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the string or NULL if not available. The result will be deallocated on the next Read() operation. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The xml:lang scope within which the node resides.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the xml:lang value or NULL if none exists. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Determine the XML version of the document being read.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | a string containing the XML version of the document or NULL in case of error. The string is deallocated with the reader. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The depth of the node in the tree.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the depth or -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Reads the contents of the current node and the full subtree. It then makes the subtree available until the next xmlTextReaderRead() call
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | a node pointer valid until the next xmlTextReaderRead() call or NULL in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Provides the value of the attribute with the specified qualified name.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>name</tt>: | the qualified name of the attribute. | <tt>Returns</tt>: | a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Provides the value of the attribute with the specified index relative to the containing element.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>no</tt>: | the zero-based index of the attribute relative to the containing element | <tt>Returns</tt>: | a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Provides the value of the specified attribute
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>localName</tt>: | the local name of the attribute. | <tt>namespaceURI</tt>: | the namespace URI of the attribute. | <tt>Returns</tt>: | a string containing the value of the specified attribute, or NULL in case of error. The string must be deallocated by the caller. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Retrieve the error callback function and user argument.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>f</tt>: | the callback function or NULL is no callback has been registered | <tt>arg</tt>: | a user argument |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Provide the column number of the current parsing point.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the user data (XML reader context) | <tt>Returns</tt>: | an int or 0 if not available |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Provide the line number of the current parsing point.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the user data (XML reader context) | <tt>Returns</tt>: | an int or 0 if not available |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Read the parser internal property.
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Whether the node has attributes.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 1 if true, 0 if false, and -1 in case or error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Whether the node can have a text value.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 1 if true, 0 if false, and -1 in case or error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Whether an Attribute node was generated from the default value defined in the DTD or schema.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 0 if not defaulted, 1 if defaulted, and -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Check if the current node is empty
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 1 if empty, 0 if not and -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Determine whether the current node is a namespace declaration rather than a regular attribute.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 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. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Retrieve the validity status from the parser context
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the flag value 1 if valid, 0 if no, and -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The local name of the node.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the local name or NULL if not available, if non NULL it need to be freed by the caller. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Obtain the base URI for the given locator.
|
|
Packit |
423ecb |
<tt>locator</tt>: | the xmlTextReaderLocatorPtr used | <tt>Returns</tt>: | the base URI or NULL in case of error, if non NULL it need to be freed by the caller. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Obtain the line number for the given locator.
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Resolves a namespace prefix in the scope of the current element.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>prefix</tt>: | the prefix whose namespace URI is to be resolved. To return the default namespace, specify NULL | <tt>Returns</tt>: | 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. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Moves the position of the current instance to the attribute with the specified qualified name.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>name</tt>: | the qualified name of the attribute. | <tt>Returns</tt>: | 1 in case of success, -1 in case of error, 0 if not found |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Moves the position of the current instance to the attribute with the specified index relative to the containing element.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>no</tt>: | the zero-based index of the attribute relative to the containing element. | <tt>Returns</tt>: | 1 in case of success, -1 in case of error, 0 if not found |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Moves the position of the current instance to the attribute with the specified local name and namespace URI.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>localName</tt>: | the local name of the attribute. | <tt>namespaceURI</tt>: | the namespace URI of the attribute. | <tt>Returns</tt>: | 1 in case of success, -1 in case of error, 0 if not found |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Moves the position of the current instance to the node that contains the current Attribute node.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 1 in case of success, -1 in case of error, 0 if not moved |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Moves the position of the current instance to the first attribute associated with the current node.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 1 in case of success, -1 in case of error, 0 if not found |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Moves the position of the current instance to the next attribute associated with the current node.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 1 in case of success, -1 in case of error, 0 if not found |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The qualified name of the node, equal to Prefix :LocalName.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the local name or NULL if not available, if non NULL it need to be freed by the caller. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The URI defining the namespace associated with the node.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the namespace URI or NULL if not available, if non NULL it need to be freed by the caller. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Skip to the node following the current one in document order while avoiding the subtree if any.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Get the node type of the current node Reference: http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/XmlNodeType.html
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the xmlNodeType of the current node or -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 1 or -1 in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
A shorthand reference to the namespace associated with the node.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the prefix or NULL if not available, if non NULL it need to be freed by the caller. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>pattern</tt>: | an XPath subset pattern | <tt>namespaces</tt>: | the prefix definitions, array of [URI, prefix] or NULL | <tt>Returns</tt>: | a non-negative number in case of success and -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The quotation mark character used to enclose the value of an attribute.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | " or ' and -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Moves the position of the current instance to the next node in the stream, exposing its properties.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Parses an attribute value into one or more Text and EntityReference nodes.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 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. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Reads the contents of the current node, including child nodes and markup.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 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. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Reads the contents of the current node, including child nodes and markup.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | a string containing the node and any XML content, or NULL if the current node cannot be serialized. The string must be deallocated by the caller. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Gets the read state of the reader.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the state value, or -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Reads the contents of an element or a text node as a string.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 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. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>schema</tt>: | a precompiled RelaxNG schema | <tt>Returns</tt>: | 0 in case the RelaxNG validation could be (des)activated and -1 in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>rng</tt>: | the path to a RelaxNG schema or NULL | <tt>Returns</tt>: | 0 in case the schemas validation could be (de)activated and -1 in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>ctxt</tt>: | the RelaxNG schema validation context or NULL | <tt>options</tt>: | options (not used yet) | <tt>Returns</tt>: | 0 in case the schemas validation could be (de)activated and -1 in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>xsd</tt>: | the path to a W3C XSD schema or NULL | <tt>Returns</tt>: | 0 in case the schemas validation could be (de)activated and -1 in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>ctxt</tt>: | the XML Schema validation context or NULL | <tt>options</tt>: | options (not used yet) | <tt>Returns</tt>: | 0 in case the schemas validation could be (de)activated and -1 in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>f</tt>: | the callback function to call on error and warnings | <tt>arg</tt>: | a user argument to pass to the callback function |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>prop</tt>: | the xmlParserProperties to set | <tt>value</tt>: | usually 0 or 1 to (de)activate it | <tt>Returns</tt>: | 0 if the call was successful, or -1 in case of error |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
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.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>schema</tt>: | a precompiled Schema schema | <tt>Returns</tt>: | 0 in case the Schema validation could be (des)activated and -1 in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Register a callback function that will be called on error and warnings. If @f is NULL, the default error and warning handlers are restored.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>f</tt>: | the callback function to call on error and warnings | <tt>arg</tt>: | a user argument to pass to the callback function |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Setup an XML reader with new options
|
|
Packit |
423ecb |
<tt>reader</tt>: | an XML reader | <tt>input</tt>: | xmlParserInputBufferPtr used to feed the reader, will be destroyed with it. | <tt>URL</tt>: | the base URL to use for the document | <tt>encoding</tt>: | the document encoding, or NULL | <tt>options</tt>: | a combination of xmlParserOption | <tt>Returns</tt>: | 0 in case of success and -1 in case of error. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Determine the standalone status of the document being read.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | 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. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
Provides the text value of the node if present
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the string or NULL if not available. The result must be deallocated with xmlFree() |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
The xml:lang scope within which the node resides.
|
|
Packit |
423ecb |
<tt>reader</tt>: | the xmlTextReaderPtr used | <tt>Returns</tt>: | the xml:lang value or NULL if none exists., if non NULL it need to be freed by the caller. |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
</body>
|
|
Packit |
423ecb |
</html>
|