Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: how to strip XML into Plain Text file

by Aristotle (Chancellor)
on Jan 25, 2005 at 22:27 UTC ( #425063=note: print w/replies, xml ) Need Help??


in reply to how to strip XML into Plain Text file

I'm turning into the resident XSLTmonk.

Feed this stylesheet into whichever XSLT processor is handy, along with your file:

<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Tr +ansform"> <xsl:output method="text" encoding="us-ascii" /> </xsl:stylesheet>

This is minimal because in your case the XSLT processor defaults (recurse full tree, printing text nodes) are a perfect fit.

For some Perl code driving an XSL transform, see my example elsewhere from earlier today: Re: MathML 2 ascii?. But if you can install those modules you probably have a commandline XSLT processor installed anyway.

Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://425063]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2022-12-06 07:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?