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

Native Development

Reply
New Developer
Posts: 19
Registered: ‎12-16-2009
My Device: 8310

Re: how to analyze a html web, sort and get related tag and content.

Dear Pyth,

thank you for the warm reply. 

 

if there is such code in the string: <h1 id="section_0">July 14 Wikipedia featured article</h1> </div>  

 

how can we get the  <h1 id="section_0"> </h1> content, use what kind api or method to fecth the content.      will you write some little codes for us. thank you.  

 

 

 

ps: i am not do coding, i am helping my colleague to ask, he is not good in English. 

New Developer
Posts: 19
Registered: ‎12-16-2009
My Device: 8310

Re: how to analyze a html web, sort and get related tag and content.

thank you. i am try to fw the content to my colleague. i am not doing coding.

my colleague want to ask:
Dear Pyth,
thank you for the warm reply.

if there is such code in the string: <h1 id="section_0">July 14 Wikipedia featured article</h1> </div>

how can we get the <h1 id="section_0"> </h1> content, use what kind api or method to fecth the content. will you write some little codes for us. thank you.



ps: i am not do coding, i am helping my colleague to ask, he is not good in English.
New Developer
Posts: 19
Registered: ‎12-16-2009
My Device: 8310

Re: how to analyze a html web, sort and get related tag and content.

my colleague say there is no QWebElement this API in BB10. is he missing sth?
Developer
Posts: 508
Registered: ‎01-19-2011
My Device: My Trusty Red Plane

Re: how to analyze a html web, sort and get related tag and content.

sorry, but unfortunately I don't have the time for that
If your colleague is the coder, tell him to check for XML parsers, or as simon said, simply use string replacements :smileytongue:
-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o
New Developer
Posts: 19
Registered: ‎12-16-2009
My Device: 8310

Re: how to analyze a html web, sort and get related tag and content.

i see, still much thanks.

will Simon be so kind spend 3-5 minutes to give us some clue
Developer
Posts: 16,584
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: how to analyze a html web, sort and get related tag and content.


jonahlin wrote:
i see, still much thanks.

will Simon be so kind spend 3-5 minutes to give us some clue

I have not done this myself so far, but i was able to google "qt parse html". maybe the api with qwebstuff is only available in qt 5.0 or the like.

 

do you need clues about substring? usually string manipulation is one of the first things in a curriculum.

regarding xml parser: there should be some good samples, afaik even in the qt API docs.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
Posts: 19
Registered: ‎12-16-2009
My Device: 8310

Re: how to analyze a html web, sort and get related tag and content.

hi, we saw there is official xml parser, we can use it well, but when try to parse our content, since it's not true XML content, then the code report error all the time. any comment ?
New Developer
Posts: 19
Registered: ‎12-16-2009
My Device: 8310

Re: how to analyze a html web, sort and get related tag and content.

Hi Pyth, thank you for the feedback.

hi, we saw there is official xml parser, we can use it well, but when try to parse our content, since it's not true XML content, then the code report error all the time. any comment ?