[Qt-interest] Parsing XML page

Srikanth srikanthsombhatla at gmail.com
Wed Mar 30 15:58:41 CEST 2011


Hi,

For extracting html block you can write a simple javascript to find the
required html blocks - if you are aware of the depth of the block inside
html DOM.
If it is XHTML, it is as equal as parsing for XML.

On Wed, Mar 30, 2011 at 3:30 PM, <qt-interest-request at qt.nokia.com> wrote:

> Send Qt-interest mailing list submissions to
>        qt-interest at qt.nokia.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.qt.nokia.com/mailman/listinfo/qt-interest
> or, via email, send a message with subject or body 'help' to
>        qt-interest-request at qt.nokia.com
>
> You can reach the person managing the list at
>        qt-interest-owner at qt.nokia.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Qt-interest digest..."
>
>
> Today's Topics:
>
>   1. Re: Unnecessary Rounding from QRectF to GCRect?
>      (Till Oliver Knoll)
>   2. Re: Parsing XML page (Konrad Rosenbaum)
>   3. Re: Qt-interest Digest, Vol 4, Issue 149 (James Yan)
>   4. Re: Cosmetic QGraphicsItems (Doru)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 30 Mar 2011 09:15:52 +0200
> From: Till Oliver Knoll <till.oliver.knoll at gmail.com>
> Subject: Re: [Qt-interest] Unnecessary Rounding from QRectF to GCRect?
> To: QT Interest List <qt-interest at trolltech.com>
> Message-ID: <9A8EEE11-6683-4B24-BF8F-64C27A426764 at gmail.com>
> Content-Type: text/plain;       charset=us-ascii
>
>
>
> Am 28.03.2011 um 17:21 schrieb Stephen Chu <stephen at ju-ju.com>:
>
> > It works pretty well. But one issue came up on the Mac version of the
> > app: The pixmap is drawn stretched or shrunk by 1 line at times.
>
> Might be unrelated, but I also observed a similar "off by one" behaviour
> when drawing pixmaps with alpha blending, and applying some transformations
> (rotation):
>
>  http://bugreports.qt.nokia.com/browse/QTBUG-15663
>
> Happens on BOTH Mac and Linux when the "native" drawing is used. Switching
> to the "Qt Raster Engine" this graphical artifact goes away, but see below.
>
> >  so I figure it's the difference between raster and Core
> > Graphics engines.
>
> Indeed, that helps in the above issue.
>
>
> > I came to the line 971 in qpaintengine_mac.cpp (Qt 4.7.2) and it creates
> > a CGRect by rounding the supplied QRectF:
> >
> >    CGRect rect = CGRectMake(qRound(r.x()), qRound(r.y()),
> > qRound(r.width()), qRound(r.height()));
> >
> > Taking out the qRound calls and my image fits perfectly. Just like the
> > Windows version.
>
> Would be interesting to try your "patch"  with the example code attached to
> above issue ;)
>
> > Should I report this as a bug?
>
> That would be a good idea :) You could also link to above issue (in case it
> really is the same cause).
>
> > Another (partial) solution is to force graphics engine to "raster" but
> > that messes up all widgets. :(
>
> Unfortunatelly on Mac: yes :( The Linux (and Windows) raster engines are
> fine.
>
> The somewhat good news is that apparently there is a major bugfix work
> done/in progress for Qt 4.8 Raster Engine on Mac.
>
> For instance this has been fixed (for 4.8):
>
> http://bugreports.qt.nokia.com/browse/QTBUG-16590
>
> Also setting the underlying GraphicsView widget to an OpenGL widget does
> help (but does not quite produce the same nice anti-aliased results).
>
> Cheers, Oliver
>
> ------------------------------
>
> Message: 2
> Date: Wed, 30 Mar 2011 09:22:05 +0200
> From: Konrad Rosenbaum <konrad at silmor.de>
> Subject: Re: [Qt-interest] Parsing XML page
> To: qt-interest at qt.nokia.com
> Message-ID: <201103300922.10735 at zaphod.konrad.silmor.de>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Tuesday 29 March 2011, Ross Bencina wrote:
> > For parsing junk HTML that may not be XML and may contain errors I've
> > used BeautifulSoup (a Python module, not perfect, but it works).. I'm
> > not sure Qt has anything similar.
>
> Another possibility might be to filter the HTML through xmllint --html (of
> libxml2) and then parsing it with the normal XML utilities of Qt.
>
>
>
>        Konrad
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 198 bytes
> Desc: This is a digitally signed message part.
> Url :
> http://lists.qt.nokia.com/pipermail/qt-interest/attachments/20110330/f0774854/attachment-0001.bin
>
> ------------------------------
>
> Message: 3
> Date: Wed, 30 Mar 2011 15:23:11 +0800
> From: James Yan <james.pizza at gmail.com>
> Subject: Re: [Qt-interest] Qt-interest Digest, Vol 4, Issue 149
> To: qt-interest at qt.nokia.com
> Message-ID: <FB63A0E4-5C30-428A-BCB2-322DC6495664 at gmail.com>
> Content-Type: text/plain; charset="us-ascii"
>
> yep, you're right.
> but it's a little bit strange that Plus requires a shift key.
>
> like most "image viewer" application, i hope to zoom in with shortcut CTRL
> + PLUS,
> but in Qt i find it acutally is "Qt::CTRL + Qt::Key_Equal".
>
> On Mar 30, 2011, at 3:04 PM, qt-interest-request at qt.nokia.com wrote:
>
> > Date: Tue, 29 Mar 2011 22:34:09 -0700
> > From: "Scott Aron Bloom" <Scott.Bloom at onshorecs.com>
> > Subject: Re: [Qt-interest] shortcut(Qt::CTRL + Qt::Key_Plus) does not
> >       work.
> > To: <qt-interest at qt.nokia.com>
> > Message-ID: <7DB34253D57D2B47AEB656218FE6AAEF3B8289 at onshorecs.com>
> > Content-Type: text/plain; charset="us-ascii"
> >
> > Make sure you are actually hitting the plus key and not the equals key..
> > the Plus usually requires a shift J
> >
> >
> >
> > From: qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com
> > [mailto:qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com] On
> > Behalf Of James Yan
> > Sent: Tuesday, March 29, 2011 9:34 PM
> > To: qt-interest at qt.nokia.com
> > Subject: [Qt-interest] shortcut(Qt::CTRL + Qt::Key_Plus) does not work.
> >
> >
> >
> > Hey all,
> >
> >
> >
> >  I've two menu action: "Zoom In" and "Zoom Out", and i set shortcut for
> > both of them,
> >
> > but only Zoom Out works (Qt::CTRL + Qt::Key_Minus), what's wrong with
> > the zoom-in shortcut(Qt::CTRL + Qt::Key_Plus)?
> >
> >  a bug? thanks.
> >
> >
> >
> > ===
> >
> > actViewZoomIn  = new QAction("Zoom In",this);
> >
> > actViewZoomIn->setShortcut( QKeySequence(Qt::CTRL + Qt::Key_Plus ) );
> >
> >
> >
> >
> > actViewZoomOut = new QAction("Zoom Out",this);
> >
> > actViewZoomOut->setShortcut( QKeySequence(Qt::CTRL + Qt::Key_Minus ) );
> >
> >
> > ===
> >
> >
> >
> > regards,
> >
> > James
> >
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.qt.nokia.com/pipermail/qt-interest/attachments/20110330/290ab988/attachment-0001.html
>
> ------------------------------
>
> Message: 4
> Date: Wed, 30 Mar 2011 07:57:42 +0000 (UTC)
> From: Doru <doruhantau at gmail.com>
> Subject: Re: [Qt-interest] Cosmetic QGraphicsItems
> To: qt-interest at qt.nokia.com
> Message-ID: <loom.20110330T095335-67 at post.gmane.org>
> Content-Type: text/plain; charset=us-ascii
>
>
> Hi,
> Can you please tell me how can you restrict resizing to a minimum
> value(width
> and/or height)?
> What happens if you continue dragging the handle?
>
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
> End of Qt-interest Digest, Vol 4, Issue 150
> *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110330/3c22f755/attachment.html 


More information about the Qt-interest-old mailing list