I came across situation where XML tag has HTML code that needs to be parsed in XSLT. Here is the XML sample:
<note>
<text><p>This is a paragraph.</p><p>This is another paragraph.</p></text>
</note>
I want the embedded paragraph elements to be stored in different variables.
This is a paragraph. should be stored in one variable and This is another paragraph. should be stored in another variable.
Can you please help?
parse-xml-fragment, see xsltfiddle.liberty-development.net/bFDb2CQ for an example. Expecting to do that in plain XSLT 1.0 in a single step is audacious, unless you have an XSLT 1.0 processor that supports an extension or easily allows you to implement one having access to an (X)HTML parser.xslt-1.0toxslt-3.0You can post it as an answer