K
K
Kornushenkov2019-11-29 14:56:25
XSL & XSLT
Kornushenkov, 2019-11-29 14:56:25

Save only the blocks you need?

Good day!
How to save only the necessary blocks from an XML document.
If the block has a specific tag or a tag with a specific value, then keep everything that is included in its parent, if not, then remove it from the selection.
Example:
from this

<document>
<cart>
......
......
   <save>1</save>
......
......
</cart>
<cart>
......
......

......
......
</cart>
</document>

became:
<document>
<cart>
......
......
   <save>1</save>
......
......
</cart>
</document>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question