The InputStreamSaxIterator class provides a SAX iterator for input streams based on libxml2
More...
|
| constructor (Qore::InputStream is, string element_name, *string encoding) |
| creates a new InputStreamSaxIterator object from the input stream and the element name passed More...
|
|
| constructor (Qore::InputStream is, string element_name, hash opts) |
| creates a new InputStreamSaxIterator object from the input stream and the element name passed More...
|
|
| copy () |
| Throws an exception; objects of this class cannot be copied. More...
|
|
| constructor (string xml, string element_name, *hash opts) |
| creates a new SaxIterator object from the XML string and element name passed More...
|
|
| copy () |
| Returns a copy of the current object (the copy will be reset to the beginning of the XML string) More...
|
|
auto | getValue () |
| returns the current value or throws an INVALID-ITERATOR exception if the iterator is invalid More...
|
|
bool | next () |
| Moves the current position to the next element in the XML string; returns False if there are no more elements; if the iterator is not pointing at a valid element before this call, the iterator will be positioned on the first element in the XML if the XML string contains the required element. More...
|
|
| reset () |
| Reset the iterator instance to its initial state. More...
|
|
bool | valid () |
| returns True if the iterator is currently pointing at a valid element, False if not More...
|
|
The InputStreamSaxIterator class provides a SAX iterator for input streams based on libxml2
◆ constructor() [1/2]
Qore::Xml::InputStreamSaxIterator::constructor |
( |
Qore::InputStream |
is, |
|
|
string |
element_name, |
|
|
*string |
encoding |
|
) |
| |
creates a new InputStreamSaxIterator object from the input stream and the element name passed
- Restrictions:
- Qore::PO_NO_FILESYSTEM
- Parameters
-
is | the input stream |
element_name | the name of the element to iterate through |
encoding | an optional encoding of the input stream; if not given, then any encoding given in the file's XML preamble is used |
- Example:
InputStreamSaxIterator i(is, "DetailRecord");
map printf("record %d: %y\n", $#, $1), i;
- Exceptions
-
XMLDOC-CONSTRUCTOR-ERROR | error parsing XML string |
◆ constructor() [2/2]
Qore::Xml::InputStreamSaxIterator::constructor |
( |
Qore::InputStream |
is, |
|
|
string |
element_name, |
|
|
hash |
opts |
|
) |
| |
creates a new InputStreamSaxIterator object from the input stream and the element name passed
- Restrictions:
- Qore::PO_NO_FILESYSTEM
- Parameters
-
is | the input stream |
element_name | the name of the element to iterate through |
opts | the following options are accepted:
|
- Example:
InputStreamSaxIterator i(is, "DetailRecord");
map printf("record %d: %y\n", $#, $1), i;
- Exceptions
-
INPUTSTREAMSAXITERATOR-OPTION-ERROR | error in option hash |
XMLDOC-CONSTRUCTOR-ERROR | error parsing XML string |
- Since
- xml 1.4
◆ copy()
Qore::Xml::InputStreamSaxIterator::copy |
( |
| ) |
|
Throws an exception; objects of this class cannot be copied.
- Exceptions
-
INPUTSTREAMSAXITERATOR-COPY-ERROR | objects of this class cannot be copied |
The documentation for this class was generated from the following file:
- /tmp/module-xml/src/QC_InputStreamSaxIterator.dox.h