summaryrefslogtreecommitdiffstats
path: root/doc/html/xml-sax-walkthrough.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/xml-sax-walkthrough.html')
-rw-r--r--doc/html/xml-sax-walkthrough.html44
1 files changed, 22 insertions, 22 deletions
diff --git a/doc/html/xml-sax-walkthrough.html b/doc/html/xml-sax-walkthrough.html
index 4703e6cba..d1c4a50f2 100644
--- a/doc/html/xml-sax-walkthrough.html
+++ b/doc/html/xml-sax-walkthrough.html
@@ -47,10 +47,10 @@ The element names are indented corresponding to their nesting level.
<p> As mentioned in <a href="xml.html#sax2Intro">Introduction to SAX2</a>
we have to implement the functions of the handler classes that we are
interested in. In our case these are only three:
-<a href="qxmlcontenthandler.html#startDocument">TQXmlContentHandler::startDocument</a>(),
-<a href="qxmlcontenthandler.html#startElement">TQXmlContentHandler::startElement</a>() and
-<a href="qxmlcontenthandler.html#endElement">TQXmlContentHandler::endElement</a>().
-<p> For this purpose we use a subclass of the <a href="qxmldefaulthandler.html">TQXmlDefaultHandler</a> (remember
+<a href="tqxmlcontenthandler.html#startDocument">TQXmlContentHandler::startDocument</a>(),
+<a href="tqxmlcontenthandler.html#startElement">TQXmlContentHandler::startElement</a>() and
+<a href="tqxmlcontenthandler.html#endElement">TQXmlContentHandler::endElement</a>().
+<p> For this purpose we use a subclass of the <a href="tqxmldefaulthandler.html">TQXmlDefaultHandler</a> (remember
that the special handler classes are all abstract and the default handler class
provides an implementation that does not change the parsing behavior):
<p> <pre>/****************************************************************************
@@ -66,16 +66,16 @@ provides an implementation that does not change the parsing behavior):
#ifndef STRUCTUREPARSER_H
#define STRUCTUREPARSER_H
-#include &lt;<a href="qxml-h.html">ntqxml.h</a>&gt;
+#include &lt;<a href="tqxml-h.html">tqxml.h</a>&gt;
class TQString;
-class StructureParser : public <a href="qxmldefaulthandler.html">TQXmlDefaultHandler</a>
+class StructureParser : public <a href="tqxmldefaulthandler.html">TQXmlDefaultHandler</a>
{
public:
bool startDocument();
bool startElement( const <a href="ntqstring.html">TQString</a>&amp;, const <a href="ntqstring.html">TQString</a>&amp;, const <a href="ntqstring.html">TQString</a>&amp; ,
- const <a href="qxmlattributes.html">TQXmlAttributes</a>&amp; );
+ const <a href="tqxmlattributes.html">TQXmlAttributes</a>&amp; );
bool endElement( const <a href="ntqstring.html">TQString</a>&amp;, const <a href="ntqstring.html">TQString</a>&amp;, const <a href="ntqstring.html">TQString</a>&amp; );
private:
@@ -96,8 +96,8 @@ get indentation right, there is nothing special about our new
#include &lt;stdio.h&gt;
#include &lt;<a href="qstring-h.html">ntqstring.h</a>&gt;
</pre>
-<p> First we overload <a href="qxmlcontenthandler.html#startDocument">TQXmlContentHandler::startDocument</a>() with a non-empty version.
-<p> <pre> <a name="x2137"></a>bool StructureParser::<a href="qxmlcontenthandler.html#startDocument">startDocument</a>()
+<p> First we overload <a href="tqxmlcontenthandler.html#startDocument">TQXmlContentHandler::startDocument</a>() with a non-empty version.
+<p> <pre> <a name="x2137"></a>bool StructureParser::<a href="tqxmlcontenthandler.html#startDocument">startDocument</a>()
{
indent = "";
return TRUE;
@@ -110,10 +110,10 @@ Also we return TRUE so that the parser continues without
reporting an error.
<p> 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 <a href="qxmlcontenthandler.html#startElement">TQXmlContentHandler::startElement</a>().
-<p> <pre> <a name="x2138"></a>bool StructureParser::<a href="qxmlcontenthandler.html#startElement">startElement</a>( const <a href="ntqstring.html">TQString</a>&amp;, const <a href="ntqstring.html">TQString</a>&amp;,
+have to overload <a href="tqxmlcontenthandler.html#startElement">TQXmlContentHandler::startElement</a>().
+<p> <pre> <a name="x2138"></a>bool StructureParser::<a href="tqxmlcontenthandler.html#startElement">startElement</a>( const <a href="ntqstring.html">TQString</a>&amp;, const <a href="ntqstring.html">TQString</a>&amp;,
const <a href="ntqstring.html">TQString</a>&amp; qName,
- const <a href="qxmlattributes.html">TQXmlAttributes</a>&amp; )
+ const <a href="tqxmlattributes.html">TQXmlAttributes</a>&amp; )
{
printf( "%s%s\n", (const char*)indent, (const char*)qName );
indent += " ";
@@ -130,8 +130,8 @@ it should be indented. Therefore we add four spaces to the
<p> Finally we return TRUE in order to let the parser continue without
errors.
<p> The last functionality we need to add is the parser's behaviour when an
-end tag occurs. This means overloading <a href="qxmlcontenthandler.html#endElement">TQXmlContentHandler::endElement</a>().
-<p> <pre> <a name="x2136"></a>bool StructureParser::<a href="qxmlcontenthandler.html#endElement">endElement</a>( const <a href="ntqstring.html">TQString</a>&amp;, const <a href="ntqstring.html">TQString</a>&amp;, const <a href="ntqstring.html">TQString</a>&amp; )
+end tag occurs. This means overloading <a href="tqxmlcontenthandler.html#endElement">TQXmlContentHandler::endElement</a>().
+<p> <pre> <a name="x2136"></a>bool StructureParser::<a href="tqxmlcontenthandler.html#endElement">endElement</a>( const <a href="ntqstring.html">TQString</a>&amp;, const <a href="ntqstring.html">TQString</a>&amp;, const <a href="ntqstring.html">TQString</a>&amp; )
{
indent.remove( (uint)0, 4 );
return TRUE;
@@ -145,7 +145,7 @@ program.
<p> <pre> #include "structureparser.h"
#include &lt;<a href="qfile-h.html">ntqfile.h</a>&gt;
- #include &lt;<a href="qxml-h.html">ntqxml.h</a>&gt;
+ #include &lt;<a href="tqxml-h.html">tqxml.h</a>&gt;
#include &lt;<a href="qwindowdefs-h.html">ntqwindowdefs.h</a>&gt;
int main( int argc, char **argv )
@@ -160,21 +160,21 @@ line to examine.
<p> <pre> StructureParser handler;
</pre>
<p> The next step is to create an instance of the <em>StructureParser</em>.
-<p> <pre> <a href="qxmlsimplereader.html">TQXmlSimpleReader</a> reader;
- <a name="x2140"></a> reader.<a href="qxmlreader.html#setContentHandler">setContentHandler</a>( &amp;handler );
+<p> <pre> <a href="tqxmlsimplereader.html">TQXmlSimpleReader</a> reader;
+ <a name="x2140"></a> reader.<a href="tqxmlreader.html#setContentHandler">setContentHandler</a>( &amp;handler );
</pre>
<p> After that we set up the reader. As our <em>StructureParser</em>
-class deals with <a href="qxmlcontenthandler.html">TQXmlContentHandler</a> functionality only
+class deals with <a href="tqxmlcontenthandler.html">TQXmlContentHandler</a> functionality only
we simply register it as the content handler of our choice.
<p> <pre> for ( int i=1; i &lt; argc; i++ ) {
</pre>
<p> Successively we deal with all files given as command line arguments.
<p> <pre> <a href="ntqfile.html">TQFile</a> xmlFile( argv[i] );
- <a href="qxmlinputsource.html">TQXmlInputSource</a> source( &amp;xmlFile );
+ <a href="tqxmlinputsource.html">TQXmlInputSource</a> source( &amp;xmlFile );
</pre>
<p> Then we create a
-<a href="qxmlinputsource.html">TQXmlInputSource</a> for the XML file to be parsed.
-<p> <pre> <a name="x2139"></a> reader.<a href="qxmlsimplereader.html#parse">parse</a>( source );
+<a href="tqxmlinputsource.html">TQXmlInputSource</a> for the XML file to be parsed.
+<p> <pre> <a name="x2139"></a> reader.<a href="tqxmlsimplereader.html#parse">parse</a>( source );
</pre>
<p> Now we take our input source and start parsing.
<p> <pre> }
@@ -206,7 +206,7 @@ animals
<p> It will however refuse to produce the correct result if you e.g. insert
a whitespace between a &lt; and the element name in your test-XML file.
To prevent such annoyances
-you should always install an error handler with <a href="qxmlreader.html#setErrorHandler">TQXmlReader::setErrorHandler</a>(). This allows you to report
+you should always install an error handler with <a href="tqxmlreader.html#setErrorHandler">TQXmlReader::setErrorHandler</a>(). This allows you to report
parsing errors to the user.
<p> <p>See also <a href="step-by-step-examples.html">Step-by-step Examples</a>.