F
fazl.rahman
Hi
I've not been able to find nor concoct a simple filter to convert an
xml file into a list of all its elements (with full paths). This
seems to be a simple requirement...!
As an example I would like this input ...:
<?xml version="1.0"?>
<Person>
<FirstName>Elvis</FirstName>
<LastName>Presley</LastName>
</Person>
....To result in this output :
/Person
/Person/FirstName
/Person/LastName
Any gurus care to share a concise xsl that does this ?
I happened across the 'navigation shell' feature of xmllint during my
fumbling attempts recently - so, lacking a suitbale xslt script, I
guess I could resort to post-processing the output of the shell's "du"
command, which looks like this:
$ xmllint --shell Person.xml
/ > du
/
Person
FirstName
LastName
(If the navigating shell from xmllint incorporated a unix-like 'find'
command, sheesh.. that would be so cool.)
Appreciate (any friendly feedback..
Thanks, Fazl
I've not been able to find nor concoct a simple filter to convert an
xml file into a list of all its elements (with full paths). This
seems to be a simple requirement...!
As an example I would like this input ...:
<?xml version="1.0"?>
<Person>
<FirstName>Elvis</FirstName>
<LastName>Presley</LastName>
</Person>
....To result in this output :
/Person
/Person/FirstName
/Person/LastName
Any gurus care to share a concise xsl that does this ?
I happened across the 'navigation shell' feature of xmllint during my
fumbling attempts recently - so, lacking a suitbale xslt script, I
guess I could resort to post-processing the output of the shell's "du"
command, which looks like this:
$ xmllint --shell Person.xml
/ > du
/
Person
FirstName
LastName
(If the navigating shell from xmllint incorporated a unix-like 'find'
command, sheesh.. that would be so cool.)
Appreciate (any friendly feedback..
Thanks, Fazl