From ea318d1431c89e647598c510c4245c6571aa5f46 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 26 Jan 2012 23:32:43 -0600 Subject: Update to latest tqt3 automated conversion --- doc/html/xml-sax-walkthrough.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'doc/html/xml-sax-walkthrough.html') diff --git a/doc/html/xml-sax-walkthrough.html b/doc/html/xml-sax-walkthrough.html index d9a2e0c23..cd26dc90f 100644 --- a/doc/html/xml-sax-walkthrough.html +++ b/doc/html/xml-sax-walkthrough.html @@ -66,7 +66,7 @@ provides an implementation that does not change the parsing behavior): #ifndef STRUCTUREPARSER_H #define STRUCTUREPARSER_H -#include <qxml.h> +#include <ntqxml.h> class TQString; @@ -74,12 +74,12 @@ class StructureParser : public TQXmlDefaultHan { public: bool startDocument(); - bool startElement( const TQString&, const TQString&, const TQString& , + bool startElement( const TQString&, const TQString&, const TQString& , const TQXmlAttributes& ); - bool endElement( const TQString&, const TQString&, const TQString& ); + bool endElement( const TQString&, const TQString&, const TQString& ); private: - TQString indent; + TQString indent; }; #endif @@ -94,7 +94,7 @@ get indentation right, there is nothing special about our new

    #include "structureparser.h"
 
     #include <stdio.h>
-    #include <qstring.h>
+    #include <ntqstring.h>
 

First we overload TQXmlContentHandler::startDocument() with a non-empty version.

    bool StructureParser::startDocument()
@@ -111,8 +111,8 @@ 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 TQXmlContentHandler::startElement(). -

    bool StructureParser::startElement( const TQString&, const TQString&,
-                                        const TQString& qName,
+

    bool StructureParser::startElement( const TQString&, const TQString&,
+                                        const TQString& qName,
                                         const TQXmlAttributes& )
     {
         printf( "%s%s\n", (const char*)indent, (const char*)qName );
@@ -131,7 +131,7 @@ it should be indented. Therefore we add four spaces to the
 errors.
 

The last functionality we need to add is the parser's behaviour when an end tag occurs. This means overloading TQXmlContentHandler::endElement(). -

    bool StructureParser::endElement( const TQString&, const TQString&, const TQString& )
+

    bool StructureParser::endElement( const TQString&, const TQString&, const TQString& )
     {
         indent.remove( (uint)0, 4 );
         return TRUE;
@@ -144,9 +144,9 @@ program.
 

    #include "structureparser.h"
-    #include <qfile.h>
-    #include <qxml.h>
-    #include <qwindowdefs.h>
+    #include <ntqfile.h>
+    #include <ntqxml.h>
+    #include <ntqwindowdefs.h>
 
     int main( int argc, char **argv )
     {
@@ -169,7 +169,7 @@ we simply register it as the content handler of our choice.
 

        for ( int i=1; i < argc; i++ ) {
 

Successively we deal with all files given as command line arguments. -

            TQFile xmlFile( argv[i] );
+

            TQFile xmlFile( argv[i] );
             TQXmlInputSource source( &xmlFile );
 

Then we create a -- cgit v1.2.3