Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Developer
Posts: 14
Registered: ‎11-25-2010
My Device: Not Specified

Reading HTML using QNXStageWebView

Hi guys,

 

My application makes use of an embedded browser (i.e. QNXStageWebView - similar to what is in the sample RSSReader project).  I am wondering how to read the HTML of the page that was just loaded - does anyone have any ideas or have successfully done this?  I noticed that in the (limited) API for QNXStageWebView there was a method called executeJavaScript which is about the only thing I can think of that might work... but not exactly sure how to use it.....

 

Any ideas?

 

Thank you.

Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Reading HTML using QNXStageWebView

Do you need the raw HTML or do you need a DOM?

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Reading HTML using QNXStageWebView

hey _salman_,

 

would you be able to accomplish this using the URLRequest API along with the URLLoader API and not directly with the QNXStageWebView?

 

here is a link to the URLRequest API:

 

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLRequest.html?filter_...

 

and a link to the URLLoader API:

 

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/URLLoader.html

 

using the two you should be able to retreive the data of a given URL in the QNXStageWebView.

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
New Developer
Posts: 14
Registered: ‎11-25-2010
My Device: Not Specified

Re: Reading HTML using QNXStageWebView

Thanks for the response guys.

 

@JCarty: The DOM tree would be good, but I'd settle even for just the raw HTML.  Any ideas?

 

@JRab:  That is a nice solution, but unless I misunderstood you, wouldn't it be a bit inefficient as the page has already loaded up in the QNXStageWebView and I'd have to make another call using the URLRequest/URLLoader APIs.  I figure that since the component already has to fetch and render the HTML... there must be a way to get at it....

 

Thanks again.

Contributor
Posts: 49
Registered: ‎11-18-2010
My Device: Flash Builder - PlayBook Simulator

Re: Reading HTML using QNXStageWebView

You're right that would be a bit inefficient and that wouldn't work with pages relying on sessions and stuff like that (think POST variables)...

I agree, we need a way to access the DOM or the raw HTML!