Portál AbcLinuxu, 7. května 2025 20:17
Řešení dotazu:
Konkrétně např.:
$ cat strip_comment.xsl <xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> <xsl:strip-space elements="*"/> <xsl:output method="xml" indent="yes" encoding="UTF-8"/> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="comment()"/> </xsl:stylesheet> $ xmlstarlet tr strip_comment.xsl input.xml >output.xml
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.