Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Highlighting HTML text

Highlighting HTML text

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rp_suman
    wrote on last edited by
    #1

    I want to know any builtin function for highlighting a given keyword in HTML file. Only the text outside of tags, comments, script code should be highlighted. I think this could be done by : Finding out the position of keyword which is a normal text Replace it with </FONT> keyword </FONT> Write the new content into the HTML file Is there any standard method for doing the same? Any suggestion would be greatly appreciable!!

    -- "Programming is an art that fights back!"

    _ 1 Reply Last reply
    0
    • R rp_suman

      I want to know any builtin function for highlighting a given keyword in HTML file. Only the text outside of tags, comments, script code should be highlighted. I think this could be done by : Finding out the position of keyword which is a normal text Replace it with </FONT> keyword </FONT> Write the new content into the HTML file Is there any standard method for doing the same? Any suggestion would be greatly appreciable!!

      -- "Programming is an art that fights back!"

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      You should look at HTML DOM Parser. Some interface and methods that may help you are IHTMLDocument IHTMLElement2::getElementsByTagName IHTMLDocument2::createElement IHTMLDOMNode::replaceChild

      «_Superman_» I love work. It gives me something to do between weekends.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups