Difference between revisions of "Parser"
From ThorstensHome
m (1 revision(s)) |
|||
Line 1: | Line 1: | ||
There are two different approaches how to write a parser with KDE: | There are two different approaches how to write a parser with KDE: | ||
* use a [http://doc.trolltech.com/4.4/qxmlinputsource.html QXMLInPutSource]. | * use a [http://doc.trolltech.com/4.4/qxmlinputsource.html QXMLInPutSource]. | ||
− | * use the DOM model. | + | * [[use the DOM model]]. |
It is important to understand that you cannot write an html parser using QXMLInPutSource unless you use strict XHTML. A line like | It is important to understand that you cannot write an html parser using QXMLInPutSource unless you use strict XHTML. A line like | ||
<body lang=DE link=blue vlink=purple bgcolor=#eeeeff> | <body lang=DE link=blue vlink=purple bgcolor=#eeeeff> | ||
− | stops a QXMLInPutSource-Parser completely because the quotation marks are missing. | + | stops a QXMLInPutSource-Parser completely because the quotation marks are missing. To convert an html file into an xhtml file use |
+ | * tidy | ||
+ | * QTextEdit |
Revision as of 13:52, 18 October 2008
There are two different approaches how to write a parser with KDE:
- use a QXMLInPutSource.
- use the DOM model.
It is important to understand that you cannot write an html parser using QXMLInPutSource unless you use strict XHTML. A line like
<body lang=DE link=blue vlink=purple bgcolor=#eeeeff>
stops a QXMLInPutSource-Parser completely because the quotation marks are missing. To convert an html file into an xhtml file use
- tidy
- QTextEdit