extract the plain text from an xml file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saumalatha
    New Member
    • Nov 2008
    • 3

    #1

    extract the plain text from an xml file

    someone please help me do this...how to extract the plain text from an xml file.
  • sgxbytes
    New Member
    • Sep 2008
    • 25

    #2
    using xsl:value-of u can get the text by giving the correct xpath.

    if you send some sample xml and describe what exactly you want it will be easy to provide solution

    regards
    Raj

    Comment

    • saumalatha
      New Member
      • Nov 2008
      • 3

      #3
      thanks for reply.
      In the follwoing xml file :

      <book>
      <subject name="match"/>
      <subject name="english"/> test
      </book>

      I want to read the text like "test" from the xml .

      Comment

      • sgxbytes
        New Member
        • Sep 2008
        • 25

        #4
        <xsl:value-of select="."/>

        Comment

        • Dormilich
          Recognized Expert Expert
          • Aug 2008
          • 8694

          #5
          or given as absolute path:
          [CODE=xml]<xsl:value-of select="/book/text()"/>[/CODE]

          Comment

          Working...