Home → 2003/09/19, 11h15
Java > Python > XPath/XSLT
Still reading about Python. In Dive Into Python, the first Object-Oriented example is about listing MP3 files in a given directory. The module contains around 50 lines of code. In Java, I guess there would be twice as many lines. But would'nt it be cool if there was a command line XPatn/XSLT app that could do file system searches? Something that may look like this:
c:\>dir -xsl <for-each select="/dir[@name='music']//file[@type='mp3']"> \
"name = " <value-of select="@name"/> \
" title = " <value-of select="@title"/> \
" artist = " <value-of select="@artist"/> \
" album = " <value-of select="@album"/> \
</for-each>
I guess this already exists.