Permalink
Browse files

Vyacheslav Pindyura managed to trigger a bug in parseStartTag, fixing…

… it.

* parser.c: Vyacheslav Pindyura managed to trigger a bug in
  parseStartTag, fixing it.
* test/att4 result/att4 result/noent/att4: adding the test
* xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: added
  more methods to XmlTextReader.
Daniel
  • Loading branch information...
1 parent d453c63 commit 67df809c3a439bcbe258bca6b60144c8a7a0f18c Daniel Veillard committed Dec 16, 2002
Showing with 27,946 additions and 7 deletions.
  1. +8 −0 ChangeLog
  2. +30 −0 doc/libxml2-api.xml
  3. +5 −0 include/libxml/xmlreader.h
  4. +3 −0 parser.c
  5. +5 −0 python/libxml2class.txt
  6. +9,264 −0 result/att4
  7. +9,264 −0 result/noent/att4
  8. +9,264 −0 test/att4
  9. +103 −7 xmlreader.c
View
@@ -1,3 +1,11 @@
+Mon Dec 16 23:00:05 CET 2002 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: Vyacheslav Pindyura managed to trigger a bug in
+ parseStartTag, fixing it.
+ * test/att4 result/att4 result/noent/att4: adding the test
+ * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: added
+ more methods to XmlTextReader.
+
Mon Dec 16 19:31:16 CET 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
* win32/libxml2.def.src: added more xml reader exports
View
@@ -1114,10 +1114,15 @@
<exports symbol='xmlTextReaderName'/>
<exports symbol='xmlTextReaderNamespaceUri'/>
<exports symbol='xmlTextReaderNodeType'/>
+ <exports symbol='xmlTextReaderNormalization'/>
<exports symbol='xmlTextReaderPrefix'/>
<exports symbol='xmlTextReaderPtr'/>
<exports symbol='xmlTextReaderQuoteChar'/>
<exports symbol='xmlTextReaderRead'/>
+ <exports symbol='xmlTextReaderReadInnerXml'/>
+ <exports symbol='xmlTextReaderReadOuterXml'/>
+ <exports symbol='xmlTextReaderReadState'/>
+ <exports symbol='xmlTextReaderReadString'/>
<exports symbol='xmlTextReaderValue'/>
<exports symbol='xmlTextReaderXmlLang'/>
</file>
@@ -8002,6 +8007,11 @@ actually an xmlCharEncoding'/>
<return type='int' info='the xmlNodeType of the current node or -1 in case of error'/>
<arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
</function>
+ <function name='xmlTextReaderNormalization' file='xmlreader'>
+ <info>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 &amp;#0; is of course not supported either.</info>
+ <return type='int' info='1 or -1 in case of error.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
<function name='xmlTextReaderPrefix' file='xmlreader'>
<info>A shorthand reference to the namespace associated with the node.</info>
<return type='xmlChar *' info='the prefix or NULL if not available'/>
@@ -8017,6 +8027,26 @@ actually an xmlCharEncoding'/>
<return type='int' info='1 if the node was read successfully, 0 if there is no more nodes to read, or -1 in case of error'/>
<arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
</function>
+ <function name='xmlTextReaderReadInnerXml' file='xmlreader'>
+ <info>Reads the contents of the current node, including child nodes and markup.</info>
+ <return type='xmlChar *' info='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.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderReadOuterXml' file='xmlreader'>
+ <info>Reads the contents of the current node, including child nodes and markup.</info>
+ <return type='xmlChar *' info='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.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderReadState' file='xmlreader'>
+ <info>Gets the read state of the reader.</info>
+ <return type='int' info='the state value, or -1 in case of error'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
+ <function name='xmlTextReaderReadString' file='xmlreader'>
+ <info>Reads the contents of an element or a text node as a string.</info>
+ <return type='xmlChar *' info='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.'/>
+ <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
+ </function>
<function name='xmlTextReaderValue' file='xmlreader'>
<info>Provides the text value of the node if present</info>
<return type='xmlChar *' info='the string or NULL if not available. The retsult must be deallocated with xmlFree()'/>
@@ -30,6 +30,9 @@ void xmlFreeTextReader (xmlTextReaderPtr reader);
* Iterators
*/
int xmlTextReaderRead (xmlTextReaderPtr reader);
+xmlChar * xmlTextReaderReadInnerXml (xmlTextReaderPtr reader);
+xmlChar * xmlTextReaderReadOuterXml (xmlTextReaderPtr reader);
+xmlChar * xmlTextReaderReadString (xmlTextReaderPtr reader);
/*
* Attributes of the node
@@ -49,6 +52,7 @@ xmlChar * xmlTextReaderPrefix (xmlTextReaderPtr reader);
int xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
xmlChar * xmlTextReaderValue (xmlTextReaderPtr reader);
xmlChar * xmlTextReaderXmlLang (xmlTextReaderPtr reader);
+int xmlTextReaderReadState (xmlTextReaderPtr reader);
/*
* Methods of the XmlTextReader
@@ -74,6 +78,7 @@ int xmlTextReaderMoveToAttributeNs (xmlTextReaderPtr reader,
int xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
int xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
int xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
+int xmlTextReaderNormalization (xmlTextReaderPtr reader);
#ifdef __cplusplus
}
View
@@ -6688,6 +6688,9 @@ xmlParseStartTag(xmlParserCtxtPtr ctxt) {
failed:
+ if (CUR == 0) {
+ GROW
+ }
if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
break;
if (!IS_BLANK(RAW)) {
View
@@ -586,9 +586,14 @@ Class xmlTextReader()
name()
namespaceUri()
nodeType()
+ normalization()
prefix()
quoteChar()
read()
+ readInnerXml()
+ readOuterXml()
+ readState()
+ readString()
value()
xmlLang()
Class xmlReg()
Oops, something went wrong.

0 comments on commit 67df809

Please sign in to comment.