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. XML / XSL
  4. Empty value is passed while reading value from an XML node

Empty value is passed while reading value from an XML node

Scheduled Pinned Locked Moved XML / XSL
xmlhelpquestion
7 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.
  • M Offline
    M Offline
    Mahesh J
    wrote on last edited by
    #1

    Hi.. I am using a function to format the date values which are read from the XML document,but in XSLT while using the following coding i am receiveing only empty value in the DOB parameter.How can i solve the issue xsl:value-of select="DateTimeConverter:ToDateTimeFormat(DOB, 'dd-MMM- YYYY')" DOB is the short form of Date of birth node below is the XML structure < Name > Guest < /Name > < DOB > 2009-06-12T02:00:47.187 < /DOB > < Age > 25 < /Age > while reading the DOB node i am reteriving only empty values how can i solve this Mahesh.J Thanks Mahesh.J

    S 1 Reply Last reply
    0
    • M Mahesh J

      Hi.. I am using a function to format the date values which are read from the XML document,but in XSLT while using the following coding i am receiveing only empty value in the DOB parameter.How can i solve the issue xsl:value-of select="DateTimeConverter:ToDateTimeFormat(DOB, 'dd-MMM- YYYY')" DOB is the short form of Date of birth node below is the XML structure < Name > Guest < /Name > < DOB > 2009-06-12T02:00:47.187 < /DOB > < Age > 25 < /Age > while reading the DOB node i am reteriving only empty values how can i solve this Mahesh.J Thanks Mahesh.J

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      Are you using the class from this page[^]? If so, have you tried the samples to verify that you've got the code installed such that it can be resolved by the XSLT engine?

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      M 1 Reply Last reply
      0
      • S Stuart Dootson

        Are you using the class from this page[^]? If so, have you tried the samples to verify that you've got the code installed such that it can be resolved by the XSLT engine?

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        M Offline
        M Offline
        Mahesh J
        wrote on last edited by
        #3

        I am using the class which is placed in the APP_Code folder

        S 1 Reply Last reply
        0
        • M Mahesh J

          I am using the class which is placed in the APP_Code folder

          S Offline
          S Offline
          Stuart Dootson
          wrote on last edited by
          #4

          Mahesh.J wrote:

          the class

          Which class? The one from the article I pointed you at?

          Mahesh.J wrote:

          which is placed in the APP_Code folder

          That's nice. Who put it there? You? Still doesn't answer the question I asked you; are you sure the XSLT processor can see the extension class?

          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

          L 1 Reply Last reply
          0
          • S Stuart Dootson

            Mahesh.J wrote:

            the class

            Which class? The one from the article I pointed you at?

            Mahesh.J wrote:

            which is placed in the APP_Code folder

            That's nice. Who put it there? You? Still doesn't answer the question I asked you; are you sure the XSLT processor can see the extension class?

            Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

            L Offline
            L Offline
            led mike
            wrote on last edited by
            #5

            Stuart Dootson wrote:

            Still doesn't answer the question I asked you

            At least you got a reply from this twit. He just deleted his post when I asked a question then reposted his question. At this point I wouldn't tell him shit.

            S 1 Reply Last reply
            0
            • L led mike

              Stuart Dootson wrote:

              Still doesn't answer the question I asked you

              At least you got a reply from this twit. He just deleted his post when I asked a question then reposted his question. At this point I wouldn't tell him shit.

              S Offline
              S Offline
              Stuart Dootson
              wrote on last edited by
              #6

              led mike wrote:

              At this point I wouldn't tell him sh*t.

              Rapidly approaching that point myself to be honest

              Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

              M 1 Reply Last reply
              0
              • S Stuart Dootson

                led mike wrote:

                At this point I wouldn't tell him sh*t.

                Rapidly approaching that point myself to be honest

                Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

                M Offline
                M Offline
                Mahesh J
                wrote on last edited by
                #7

                Sorry Guys, I thank you for ur reply.I found the problem myself and sloved the issue.Below is code that i used previously where i faced the problem <xsl:for-each select="Customer//CustomerDetails"> <xsl:value-of select="DateTimeConverter:ToDateTimeFormat(Customer//CustomerDetails/DOB,'dd-MMM-yy')" /> </xsl:for-each> Inside the for-each loop value for the DOB parameter is reterived as empty. Then i solved the issue by using the msxsl function as shown below <xsl:value-of select="msxsl:format-date(DOB, 'MMM dd, yyyy')" /> Regards Mahesh.J

                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