I have an Xml
How do i remove some part of s
Your example is confusing. If you have an XML input such as:
<input Inputxml="<order><Line PPlineNO="1">Bingo</Line></order>"/>
where the Inputxml
attribute holds the escaped XML:
<order><Line PPlineNO="1">Bingo</Line></order>
you can use:
<xsl:template match="input">
<result>
<xsl:value-of select="substring-before(substring-after(@Inputxml, 'PPlineNO="1">'), '</Line>')" />
</result>
</xsl:template>
to get:
<result>Bingo</result>
Note that is not a good way to parse XML (or rather what used to be XML). It would be much smarter to unescape it first, then parse it as XML. In XSLT 3.0, you can use the parse-xml()
function for this. In XSLT 1.0/2.0, you can do:
<xsl:value-of select="@Inputxml" disable-output-escaping="yes"/>
save the result to a file, and process the resulting file using another XSLT stylesheet.