To match the specific XML elements child like of parent element, the syntax…
2022
To match the specific XML elements child like of parent element, the syntax will be –
- A.
<xsl:template match="PLANET_NAME">
- B.
<xsl:template match="PLANET/NAME">
- C.
<xsl:template match="NAME">
- D.
<xsl:template match="//">
Attempted by 99 students.
Show answer & explanation
Correct answer: B
In XSLT, XPath expressions are used in the match attribute to select nodes.
The / operator specifies a direct parent–child relationship, so PLANET/NAME matches NAME elements that are children of PLANET, ensuring precise hierarchical selection.