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#
  4. about html operate [modified]

about html operate [modified]

Scheduled Pinned Locked Moved C#
csharphtmlxmlquestion
11 Posts 3 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.
  • J jason_mf

    C# has XmlDocument and other xml operate object. has it Html operate object? such as XmlDocument. use in WinForm.

    M Offline
    M Offline
    Mandaar Kulkarni
    wrote on last edited by
    #2

    check SHDocVw.dll (Microsoft Internet Controls) You can use Document property WebBrowserClass to get the HTMLDocument. Hope this helps you.

    J 1 Reply Last reply
    0
    • M Mandaar Kulkarni

      check SHDocVw.dll (Microsoft Internet Controls) You can use Document property WebBrowserClass to get the HTMLDocument. Hope this helps you.

      J Offline
      J Offline
      jason_mf
      wrote on last edited by
      #3

      where is SHDocVw.dll in? I want to use it in ClassLibrary.

      M 1 Reply Last reply
      0
      • J jason_mf

        C# has XmlDocument and other xml operate object. has it Html operate object? such as XmlDocument. use in WinForm.

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #4

        HTML is a page description language, not a programming language, so it doesn't have any objects at all. Javascript has some objects to handle XML. google "javascript xml"[^]

        --- single minded; short sighted; long gone;

        J 1 Reply Last reply
        0
        • J jason_mf

          where is SHDocVw.dll in? I want to use it in ClassLibrary.

          M Offline
          M Offline
          Mandaar Kulkarni
          wrote on last edited by
          #5

          Basically SHDocVw is a com dll. Add following references... .NET -> Microsoft.MSHtml COM -> Microsoft Internet Controls Then You can use MSHTml.HTMLDocument object to access various properties of HTML like activeelement, baseurl, childnodes etc...

          J 1 Reply Last reply
          0
          • G Guffa

            HTML is a page description language, not a programming language, so it doesn't have any objects at all. Javascript has some objects to handle XML. google "javascript xml"[^]

            --- single minded; short sighted; long gone;

            J Offline
            J Offline
            jason_mf
            wrote on last edited by
            #6

            I want to get some html's Element's text value, and some Attribute value. Html structure as follows: Textjason ![](file:///E:\Projects\FreeIM\FreeIM\bin\Debug\face\2\0.gif) Textjaosn ![](file:///E:\Projects\FreeIM\FreeIM\bin\Debug\face\2\1.gif) .... img and text irregularly display. I want font-Attribute,text and src's value. how to do is better?

            G 1 Reply Last reply
            0
            • M Mandaar Kulkarni

              Basically SHDocVw is a com dll. Add following references... .NET -> Microsoft.MSHtml COM -> Microsoft Internet Controls Then You can use MSHTml.HTMLDocument object to access various properties of HTML like activeelement, baseurl, childnodes etc...

              J Offline
              J Offline
              jason_mf
              wrote on last edited by
              #7

              I have a html Fragment: "{font face=宋体 color=#FF00FF>Jason![](file:///D:\图片\刀\恶魔之吻.jpg)Jason![](file:///D:\图片\刀\恶魔之吻.jpg)

              M 1 Reply Last reply
              0
              • J jason_mf

                I want to get some html's Element's text value, and some Attribute value. Html structure as follows: Textjason ![](file:///E:\Projects\FreeIM\FreeIM\bin\Debug\face\2\0.gif) Textjaosn ![](file:///E:\Projects\FreeIM\FreeIM\bin\Debug\face\2\1.gif) .... img and text irregularly display. I want font-Attribute,text and src's value. how to do is better?

                G Offline
                G Offline
                Guffa
                wrote on last edited by
                #8

                I can only see half of the code that you posted. Use the "Ignore HTML" option when you are posting htlm code.

                --- single minded; short sighted; long gone;

                J 1 Reply Last reply
                0
                • G Guffa

                  I can only see half of the code that you posted. Use the "Ignore HTML" option when you are posting htlm code.

                  --- single minded; short sighted; long gone;

                  J Offline
                  J Offline
                  jason_mf
                  wrote on last edited by
                  #9

                  jason ![](file:///E:\Projects\FreeIM\FreeIM\bin\Debug\face\2\0.gif) jaosn ![](file:///E:\Projects\FreeIM\FreeIM\bin\Debug\face\2\1.gif) ....

                  G 1 Reply Last reply
                  0
                  • J jason_mf

                    I have a html Fragment: "{font face=宋体 color=#FF00FF>Jason![](file:///D:\图片\刀\恶魔之吻.jpg)Jason![](file:///D:\图片\刀\恶魔之吻.jpg)

                    M Offline
                    M Offline
                    Mandaar Kulkarni
                    wrote on last edited by
                    #10

                    Can you just try out using mshtml.HTMLDocument class? I remember using it for somewhat similar purpose. Or else if possible mail me your file I will look if I can do any thing. Thanks...

                    1 Reply Last reply
                    0
                    • J jason_mf

                      jason ![](file:///E:\Projects\FreeIM\FreeIM\bin\Debug\face\2\0.gif) jaosn ![](file:///E:\Projects\FreeIM\FreeIM\bin\Debug\face\2\1.gif) ....

                      G Offline
                      G Offline
                      Guffa
                      wrote on last edited by
                      #11

                      That is not valid XML code. It looks like HTML code. Where do you get it from and how are you trying to use it?

                      --- single minded; short sighted; long gone;

                      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