Shellscript Read XML attribute value

后端 未结 3 993
刺人心
刺人心 2021-01-05 23:08

We want to read XML attributes from an XML file. Example of file content is as below:


  
  <         


        
3条回答
  •  隐瞒了意图╮
    2021-01-05 23:18

    quick and dirty

    sed -n '//,\|| {
       s/ */\1/p
       }'
    

    no xml check and based on your sample so assume same structure (one property name per line, ...)

    posix version (--posix for GNU sed)

提交回复
热议问题