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. ASP.NET
  4. CSS element parser

CSS element parser

Scheduled Pinned Locked Moved ASP.NET
cssxmljsonquestion
7 Posts 2 Posters 8 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.
  • E Offline
    E Offline
    econner
    wrote on last edited by
    #1

    Anyone know of a CSS 2 compliant parser control/library to allow parsing of a CSS file and be able to change colors, background images, etc? I currently have a control that parses the CSS and puts it into a XML file. I can then access the XML node to get to the element. However, I am looking for a control to parse the sepecific elements and that is compliant with the CSS standards.

    G 1 Reply Last reply
    0
    • E econner

      Anyone know of a CSS 2 compliant parser control/library to allow parsing of a CSS file and be able to change colors, background images, etc? I currently have a control that parses the CSS and puts it into a XML file. I can then access the XML node to get to the element. However, I am looking for a control to parse the sepecific elements and that is compliant with the CSS standards.

      G Offline
      G Offline
      g00fyman
      wrote on last edited by
      #2

      try this[^] its written in java, but if i remember corerctly i used it a while ago and converted it to c# without too much problem, i would give you the c# source only my old boss has it :( regards, g00fy

      E 2 Replies Last reply
      0
      • G g00fyman

        try this[^] its written in java, but if i remember corerctly i used it a while ago and converted it to c# without too much problem, i would give you the c# source only my old boss has it :( regards, g00fy

        E Offline
        E Offline
        econner
        wrote on last edited by
        #3

        Thanks for the reference. I will take a closer look. What is the best method of converting the java classes to C#? I have only tried this once before by using the conversion wizard in VS and wasn't successful. Did you code the conversion manually or use a conversion tool? Thanks

        1 Reply Last reply
        0
        • G g00fyman

          try this[^] its written in java, but if i remember corerctly i used it a while ago and converted it to c# without too much problem, i would give you the c# source only my old boss has it :( regards, g00fy

          E Offline
          E Offline
          econner
          wrote on last edited by
          #4

          After taking a closer look, it looks like these classes convert the CSS file into a DOM XML document. Does the CSSParser also have functions to parse the elements of the XML document, or do you need to use SAC 1.3? I currently have a control that converts the CSS file to XML and back. This sounds similar to the descripition of the CSSParser. I am also looking to be able to edit the elements of the node in the XML tree and stay CSS complinant. The control I have does not have the ability to parse the elements of the XML document. Did you have to convert/use both the CSSParser and the SAC 1.3? Or, was everything in the CSSParser?

          G 1 Reply Last reply
          0
          • E econner

            After taking a closer look, it looks like these classes convert the CSS file into a DOM XML document. Does the CSSParser also have functions to parse the elements of the XML document, or do you need to use SAC 1.3? I currently have a control that converts the CSS file to XML and back. This sounds similar to the descripition of the CSSParser. I am also looking to be able to edit the elements of the node in the XML tree and stay CSS complinant. The control I have does not have the ability to parse the elements of the XML document. Did you have to convert/use both the CSSParser and the SAC 1.3? Or, was everything in the CSSParser?

            G Offline
            G Offline
            g00fyman
            wrote on last edited by
            #5

            Hi, The conversion was done using the JLCA (Java Language Conversion Assistant) that comes with VS .NET 2005. My task was only to convert the source to a usable format for other team members. From memory though (and it was a while ago) they were attempting to achieve what you are trying to achieve, so I assume the CSSParser application contains all that is required. Sorry for my vagueness but I was not directly involved in the latter stages of development, I was only called on because I knew both languages (JAVA & .NET). Regards, g00fy

            E 2 Replies Last reply
            0
            • G g00fyman

              Hi, The conversion was done using the JLCA (Java Language Conversion Assistant) that comes with VS .NET 2005. My task was only to convert the source to a usable format for other team members. From memory though (and it was a while ago) they were attempting to achieve what you are trying to achieve, so I assume the CSSParser application contains all that is required. Sorry for my vagueness but I was not directly involved in the latter stages of development, I was only called on because I knew both languages (JAVA & .NET). Regards, g00fy

              E Offline
              E Offline
              econner
              wrote on last edited by
              #6

              Thanks. I tried converting the SAC 1.3 java classes with the JLCA in Visual Studio 2003. The conversion had 3 errors and 1 warning. I haven't had a chance to check into the errors. I will take a look at the CSSParser classes as well. Thanks for your help.

              1 Reply Last reply
              0
              • G g00fyman

                Hi, The conversion was done using the JLCA (Java Language Conversion Assistant) that comes with VS .NET 2005. My task was only to convert the source to a usable format for other team members. From memory though (and it was a while ago) they were attempting to achieve what you are trying to achieve, so I assume the CSSParser application contains all that is required. Sorry for my vagueness but I was not directly involved in the latter stages of development, I was only called on because I knew both languages (JAVA & .NET). Regards, g00fy

                E Offline
                E Offline
                econner
                wrote on last edited by
                #7

                I downloaded the CSSParser and used the JLCA from VS .NET 2003 to convert the classes. The conversion had 119 errors. The most common is: The equivalent in .NET for method 'java.lang.Throwable.getMessage' may return a different value.

                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