Quantcast
Channel: Generate tree output from specific/general XML file in Bash - Ask Ubuntu
Browsing latest articles
Browse All 3 View Live

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 Article


Answer 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 Article


Generate 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
Browsing latest articles
Browse All 3 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>