×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    1

    Question WRT parsing of non-xhtml HTML

    I'm making a XmlHttpRequest to an actual web page inside a WRT widget. The response is not XML, not XHTML but just HTML. I can get it as text, but is there a decent way to parse it so I can extract information from it? Right now, I'm considering custom-tailored regular expressions, but I'd much prefer a DOM-like model. I've also considered using an IFRAME but have not yet explored that path. It seems DOMParser.parseFromString is only for XML.

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: WRT parsing of non-xhtml HTML

    Hi Trinition,

    if the HTML you receive is not well-formed, you basically have 2 options:

    1) use regular expressions, as you mention

    2) manually well-form it

    Most of times, the first option is by far the simplest

    Pit

Similar Threads

  1. wrt support for html 5
    By james_027 in forum Symbian
    Replies: 5
    Last Post: 2009-10-05, 14:05
  2. Parsing the HTML content..?
    By mayankkedia in forum Symbian
    Replies: 2
    Last Post: 2007-02-21, 06:09
  3. I follow the following steps to converting from HTML to XHTML
    By mikeliu1976 in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2005-03-08, 07:22
  4. Html 2 Xhtml Mp
    By lingtao in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2003-11-20, 17:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×