-2

I have below xml file

    <sect2>
      <title>Prophylaxis</title>
      <para><calc type="weight"/> EXAMPLE DATA</para>
      <para>2 months</para>
    </sect2>

I tried with some regular expressions, but no luck

I wanted to extract "EXAMPLE DATA" using xslt template.

Rajaneesh
  • 181
  • 1
  • 12
  • 2
    This is a trivial task in XSLT. Spend half an hour with a tutorial and you will know how to do it. -- P.S. Do not try using regex to parse XML: https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 – michael.hor257k Jun 11 '19 at 19:41

1 Answers1

1

I am assuming that you want XPath to extract data from XML, refer below or link:

<xsl:value-of select="//sect2/para"/>
Amrendra Kumar
  • 1,806
  • 1
  • 7
  • 17