↧
Answer by user216043 for Generate tree output from specific/general XML file...
(If not already installed, install xidel)xidel ex.xml \ -e '//@display/concat(substring("------",1,count(ancestor::*)),">",.)'substring("------",1,n) is a dirty way of building a string with n "-"
View ArticleAnswer by muru for Generate tree output from specific/general XML file in Bash
Adapting one of the examples from the xmlstarlet docs:xmlstarlet sel -T -t -m '//*' \ -i '@display' \ -m 'ancestor-or-self::*' \ -i '(position()=last())' \ -o '-> ' -v '@display' -b \ -o $'\t' -b \...
View ArticleGenerate tree output from specific/general XML file in Bash
I am trying to generate a tree from an XML file in Bash.This is a part of the XML file:<menu name="main_menu" display="Main Menu"><application name="load_profiles" display="Load...
View Article