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. Web Development
  3. How to parse CSS of a HTML document using MSHTML ?

How to parse CSS of a HTML document using MSHTML ?

Scheduled Pinned Locked Moved Web Development
htmlcsshelptutorialquestion
3 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.
  • D Offline
    D Offline
    DimaC
    wrote on last edited by
    #1

    Is it possible to parse the CSS of an HTML document using MSHTML ? I need to get the css style assigned to any element from the html. When the style is written inside the element's tag, then its structure is contained in "style" attribute of that element (e.g.: node.getAttribute("style") contains the structure of the css style of the 'node' element). However if the element refers to an outside CSS class (e.g. - refers to class main) then the mshtml control doesn't seem to offer the possibility to parse the "main" style like in the above case. Can anybody help me ? Thanks.

    S 1 Reply Last reply
    0
    • D DimaC

      Is it possible to parse the CSS of an HTML document using MSHTML ? I need to get the css style assigned to any element from the html. When the style is written inside the element's tag, then its structure is contained in "style" attribute of that element (e.g.: node.getAttribute("style") contains the structure of the css style of the 'node' element). However if the element refers to an outside CSS class (e.g. - refers to class main) then the mshtml control doesn't seem to offer the possibility to parse the "main" style like in the above case. Can anybody help me ? Thanks.

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      Check out the currentStyle property.

      ---- Scripts i've known... CPhog 0.9.9 - make CP better. Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve Print forum 0.1.1 - printer-friendly forums

      D 1 Reply Last reply
      0
      • S Shog9 0

        Check out the currentStyle property.

        ---- Scripts i've known... CPhog 0.9.9 - make CP better. Forum Bookmark 0.2.5 - bookmark forum posts on Pensieve Print forum 0.1.1 - printer-friendly forums

        D Offline
        D Offline
        DimaC
        wrote on last edited by
        #3

        Thanks !

        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