Menu

Search HTML

mmmOhneM
2005-01-09
2013-05-20
  • mmmOhneM

    mmmOhneM - 2005-01-09

    Hi,

    is it possible to search with TinyXML through a HTML file ? I want to find the link to a certain link-Text. Somewhere in the document is a tag
    <a href="/the/link/imlookingfor">searchtext</a>

    I just have the seach-text and know, that is is somewhere in the document (but not the child-connection). I want to get the a-Elemnt for this text, get the "href" Attribute and be happy.

    Is this possible?

    thanks alot

     
    • Yves Berquin

      Yves Berquin - 2005-01-09

      In order to use -any- XML parser to parse an HTML document, it must be XHTML.
      They generally are not.
      You have to use an HTML to XML converter first, but this is far from working perfectly.
      Try HTML tidy at

      http://sourceforge.net/projects/tidy/

      It's worth giving it a shot.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.