diff options
Diffstat (limited to 'doc/xml-sax-walkthrough.doc')
-rw-r--r-- | doc/xml-sax-walkthrough.doc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/doc/xml-sax-walkthrough.doc b/doc/xml-sax-walkthrough.doc index 97b8e0d61..74a8a013e 100644 --- a/doc/xml-sax-walkthrough.doc +++ b/doc/xml-sax-walkthrough.doc @@ -61,11 +61,11 @@ The element names are indented corresponding to their nesting level. As mentioned in \link xml.html#sax2Intro Introduction to SAX2 \endlink we have to implement the functions of the handler classes that we are interested in. In our case these are only three: -\l QXmlContentHandler::startDocument(), -\l QXmlContentHandler::startElement() and -\l QXmlContentHandler::endElement(). +\l TQXmlContentHandler::startDocument(), +\l TQXmlContentHandler::startElement() and +\l TQXmlContentHandler::endElement(). -For this purpose we use a subclass of the \l QXmlDefaultHandler (remember +For this purpose we use a subclass of the \l TQXmlDefaultHandler (remember that the special handler classes are all abstract and the default handler class provides an implementation that does not change the parsing behavior): @@ -82,7 +82,7 @@ Even the implementation is straight-forward: \skipto include \printuntil ntqstring.h -First we overload \l QXmlContentHandler::startDocument() with a non-empty version. +First we overload \l TQXmlContentHandler::startDocument() with a non-empty version. \printline startDocument \printuntil } @@ -95,7 +95,7 @@ reporting an error. Because we want to be informed when the parser comes accross a start tag of an element and subsequently print it out, we -have to overload \l QXmlContentHandler::startElement(). +have to overload \l TQXmlContentHandler::startElement(). \printline startElement \printuntil } @@ -114,7 +114,7 @@ Finally we return TRUE in order to let the parser continue without errors. The last functionality we need to add is the parser's behaviour when an -end tag occurs. This means overloading \l QXmlContentHandler::endElement(). +end tag occurs. This means overloading \l TQXmlContentHandler::endElement(). \printline endElement \printuntil } @@ -141,7 +141,7 @@ The next step is to create an instance of the \e StructureParser. \printline setContentHandler After that we set up the reader. As our \e StructureParser -class deals with \l QXmlContentHandler functionality only +class deals with \l TQXmlContentHandler functionality only we simply register it as the content handler of our choice. \printuntil for @@ -149,10 +149,10 @@ we simply register it as the content handler of our choice. Successively we deal with all files given as command line arguments. \printline xmlFile -\printline QXmlInputSource +\printline TQXmlInputSource Then we create a -\l QXmlInputSource for the XML file to be parsed. +\l TQXmlInputSource for the XML file to be parsed. \printline parse @@ -182,7 +182,7 @@ It will however refuse to produce the correct result if you e.g. insert a whitespace between a < and the element name in your test-XML file. To prevent such annoyances you should always install an error handler with \l -QXmlReader::setErrorHandler(). This allows you to report +TQXmlReader::setErrorHandler(). This allows you to report parsing errors to the user. |