XSLT (XSL Transformations) Question:
Download Job Interview Questions and Answers PDF
Explain how to remove a particular element from XML?
Answer:
Removing element from XML document via XSL transformation or XSLT is easy if you are familiar with Identity template. You need to write two templates one is Identity template, which copies every thing and other for matching with particular element and doing nothing just like shown below, which will then result in removal of a that particular element. See an example of removing XML elements using XSLT for details.
<xsl:template match="/root/product"/>
<xsl:template match="/root/product"/>
Download XSLT Interview Questions And Answers
PDF
Previous Question | Next Question |
How to perform XML transformation in Java? | Explain how to remove a particular attribute from XML? |