mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-25 06:03:34 +03:00
one really need to provide the base URI information when creating a reader
* doc/libxml2-api.xml python/tests/reader.py: one really need to provide the base URI information when creating a reader parser from an input stream. Updated the API and the example using it. Daniel
This commit is contained in:
parent
ea7751d53b
commit
4258b9c8aa
@ -1,3 +1,9 @@
|
||||
Fri Dec 20 11:27:49 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* doc/libxml2-api.xml python/tests/reader.py: one really need
|
||||
to provide the base URI information when creating a reader parser
|
||||
from an input stream. Updated the API and the example using it.
|
||||
|
||||
Fri Dec 20 01:11:30 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* testReader.c xmlreader.c valid.c include/libxml/tree.h
|
||||
|
@ -909,6 +909,9 @@
|
||||
<exports symbol='xmlValidateOneAttribute'/>
|
||||
<exports symbol='xmlValidateOneElement'/>
|
||||
<exports symbol='xmlValidateOneNamespace'/>
|
||||
<exports symbol='xmlValidatePopElement'/>
|
||||
<exports symbol='xmlValidatePushCData'/>
|
||||
<exports symbol='xmlValidatePushElement'/>
|
||||
<exports symbol='xmlValidateRoot'/>
|
||||
<exports symbol='xmlValidityErrorFunc'/>
|
||||
<exports symbol='xmlValidityWarningFunc'/>
|
||||
@ -2669,6 +2672,8 @@ actually an xmlCharEncoding'/>
|
||||
<field name='next' type='struct _xmlID *' info=' next ID'/>
|
||||
<field name='value' type='const xmlChar *' info=' The ID name'/>
|
||||
<field name='attr' type='xmlAttrPtr' info=' The attribute holding it'/>
|
||||
<field name='name' type='const xmlChar *' info=' The attribute if attr is not available'/>
|
||||
<field name='lineno' type='int' info=' The line number if attr is not available'/>
|
||||
</struct>
|
||||
<typedef name='xmlIDPtr' file='tree' type='xmlID *'/>
|
||||
<struct name='xmlIDTable' file='valid' type='struct _xmlHashTable'/>
|
||||
@ -2843,6 +2848,8 @@ actually an xmlCharEncoding'/>
|
||||
<field name='next' type='struct _xmlRef *' info=' next Ref'/>
|
||||
<field name='value' type='const xmlChar *' info=' The Ref name'/>
|
||||
<field name='attr' type='xmlAttrPtr' info=' The attribute holding it'/>
|
||||
<field name='name' type='const xmlChar *' info=' The attribute if attr is not available'/>
|
||||
<field name='lineno' type='int' info=' The line number if attr is not available'/>
|
||||
</struct>
|
||||
<typedef name='xmlRefPtr' file='tree' type='xmlRef *'/>
|
||||
<struct name='xmlRefTable' file='valid' type='struct _xmlHashTable'/>
|
||||
@ -6493,6 +6500,7 @@ actually an xmlCharEncoding'/>
|
||||
<info>Create an xmlTextReader structure fed with @input</info>
|
||||
<return type='xmlTextReaderPtr' info='the new xmlTextReaderPtr or NULL in case of error'/>
|
||||
<arg name='input' type='xmlParserInputBufferPtr' info='the xmlParserInputBufferPtr used to read data'/>
|
||||
<arg name='URI' type='const char *' info='the URI information for the source if available'/>
|
||||
</function>
|
||||
<function name='xmlNewTextReaderFilename' file='xmlreader'>
|
||||
<info>Create an xmlTextReader structure fed with the resource at @URI</info>
|
||||
@ -7276,7 +7284,7 @@ actually an xmlCharEncoding'/>
|
||||
<function name='xmlRegExecPushString' file='xmlregexp'>
|
||||
<info>Push one input token in the execution context</info>
|
||||
<return type='int' info='1 if the regexp reached a final state, 0 if non-final, and a negative value in case of error.'/>
|
||||
<arg name='exec' type='xmlRegExecCtxtPtr' info='a regexp execution context'/>
|
||||
<arg name='exec' type='xmlRegExecCtxtPtr' info='a regexp execution context or NULL to indicate the end'/>
|
||||
<arg name='value' type='const xmlChar *' info='a string token input'/>
|
||||
<arg name='data' type='void *' info='data associated to the token to reuse in callbacks'/>
|
||||
</function>
|
||||
@ -8985,6 +8993,29 @@ actually an xmlCharEncoding'/>
|
||||
<arg name='ns' type='xmlNsPtr' info='an namespace declaration instance'/>
|
||||
<arg name='value' type='const xmlChar *' info='the attribute value (without entities processing)'/>
|
||||
</function>
|
||||
<function name='xmlValidatePopElement' file='valid'>
|
||||
<info>Pop the element end from the validation stack.</info>
|
||||
<return type='int' info='1 if no validation problem was found or 0 otherwise'/>
|
||||
<arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
|
||||
<arg name='doc' type='xmlDocPtr' info='a document instance'/>
|
||||
<arg name='elem' type='xmlNodePtr' info='an element instance'/>
|
||||
<arg name='qname' type='const xmlChar *' info='the qualified name as appearing in the serialization'/>
|
||||
</function>
|
||||
<function name='xmlValidatePushCData' file='valid'>
|
||||
<info>check the CData parsed for validation in the current stack</info>
|
||||
<return type='int' info='1 if no validation problem was found or 0 otherwise'/>
|
||||
<arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
|
||||
<arg name='data' type='const xmlChar *' info='some character data read'/>
|
||||
<arg name='len' type='int' info='the lenght of the data'/>
|
||||
</function>
|
||||
<function name='xmlValidatePushElement' file='valid'>
|
||||
<info>Push a new element start on the validation stack.</info>
|
||||
<return type='int' info='1 if no validation problem was found or 0 otherwise'/>
|
||||
<arg name='ctxt' type='xmlValidCtxtPtr' info='the validation context'/>
|
||||
<arg name='doc' type='xmlDocPtr' info='a document instance'/>
|
||||
<arg name='elem' type='xmlNodePtr' info='an element instance'/>
|
||||
<arg name='qname' type='const xmlChar *' info='the qualified name as appearing in the serialization'/>
|
||||
</function>
|
||||
<function name='xmlValidateRoot' file='valid'>
|
||||
<info>Try to validate a the root element basically it does the following check as described by the XML-1.0 recommendation: - [ VC: Root Element Type ] it doesn't try to recurse or apply other check to the element</info>
|
||||
<return type='int' info='1 if valid or 0 otherwise'/>
|
||||
|
@ -8,7 +8,7 @@ libxml2.debugMemory(1)
|
||||
|
||||
f = StringIO.StringIO("""<a><b b1="b1"/><c>content of c</c></a>""")
|
||||
input = libxml2.inputBuffer(f)
|
||||
reader = input.newTextReader()
|
||||
reader = input.newTextReader("test1")
|
||||
ret = reader.read()
|
||||
if ret != 1:
|
||||
print "Error reading to first element"
|
||||
@ -68,7 +68,7 @@ if ret != 0:
|
||||
#
|
||||
f = StringIO.StringIO("""<test xmlns:dt="urn:datatypes" dt:type="int"/>""")
|
||||
input = libxml2.inputBuffer(f)
|
||||
reader = input.newTextReader()
|
||||
reader = input.newTextReader("test2")
|
||||
|
||||
ret = reader.read()
|
||||
if ret != 1:
|
||||
@ -90,7 +90,7 @@ f = StringIO.StringIO("""<root xmlns:a="urn:456">
|
||||
</item>
|
||||
</root>""")
|
||||
input = libxml2.inputBuffer(f)
|
||||
reader = input.newTextReader()
|
||||
reader = input.newTextReader("test3")
|
||||
|
||||
ret = reader.read()
|
||||
while ret == 1:
|
||||
@ -109,7 +109,7 @@ if ret != 1:
|
||||
#
|
||||
f = StringIO.StringIO("""<testattr xmlns="urn:1" xmlns:a="urn:2" b="b" a:b="a:b"/>""")
|
||||
input = libxml2.inputBuffer(f)
|
||||
reader = input.newTextReader()
|
||||
reader = input.newTextReader("test4")
|
||||
ret = reader.read()
|
||||
if ret != 1:
|
||||
print "Error reading the testattr element"
|
||||
|
Loading…
x
Reference in New Issue
Block a user