|Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions|
The TQXmlInputSource class provides the input data for the TQXmlReader subclasses. More...
All the functions in this class are reentrant when TQt is built with thread support.
List of all member functions.
All subclasses of TQXmlReader read the input XML document from this class.
This class recognizes the encoding of the data by reading the encoding declaration in the XML file if it finds one, and reading the data using the corresponding encoding. If it does not find an encoding declaration, then it assumes that the data is either in UTF-8 or UTF-16, depending on whether it can find a byte-order mark.
There are two ways to populate the input source with data: you can construct it with a TQIODevice* so that the input source reads the data from that device. Or you can set the data explicitly with one of the setData() functions.
Usually you either construct a TQXmlInputSource that works on a TQIODevice* or you construct an empty TQXmlInputSource and set the data with setData(). There are only rare occasions where you would want to mix both methods.
The TQXmlReader subclasses use the next() function to read the input character by character. If you want to start from the beginning again, use reset().
The functions data() and fetchData() are useful if you want to do something with the data other than parsing, e.g. displaying the raw XML file. The benefit of using the TQXmlInputClass in such cases is that it tries to use the correct encoding.
See also TQXmlReader, TQXmlSimpleReader, and XML.
See also setData().
See also setData(), fetchData(), and TQIODevice.
Constructs an input source and gets the data from the file file. If the file cannot be read the input source is empty.
Constructs an input source and gets the data from the text stream stream.
See also setData(), TQXmlInputSource(), and fetchData().
This object contains no data after a call to this function if the object was constructed without a device to read data from or if this function was not able to get more data from the device.
There are two occasions where a fetch is done implicitly by another function call: during construction (so that the object starts out with some initial data where available), and during a call to next() (if the data had run out).
You don't normally need to use this function if you use next().
See also data(), next(), and TQXmlInputSource().
If beginning is TRUE, this function assumes that the data starts at the beginning of a new XML document and looks for an encoding declaration. If beginning is FALSE, it converts the raw data using the encoding determined from prior calls.
See also reset(), fetchData(), TQXmlSimpleReader::parse(), and TQXmlSimpleReader::parseContinue().
See also next().
If the input source already contains data, this function deletes that data first.
See also data().
The data dat is passed through the correct text-codec, before it is set.
This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.