Skip to main content
added 4 characters in body
Source Link
JJoao
  • 12.8k
  • 1
  • 26
  • 45

Install xidel and use xpath. 

In my opinion the best point of view is from serviceInstance:

xidel f.xml -e '//serviceInstance/string-join((../../@name, machine, status),",")'
Adapter/Code1,123,Running
Adapter/Code1,456,Running
Adapter/Code2,123,Running
Adapter/Code2,456,Running

Install xidel and use xpath. In my opinion the best point of view is from serviceInstance:

xidel f.xml -e '//serviceInstance/string-join((../../@name, machine, status),",")'
Adapter/Code1,123,Running
Adapter/Code1,456,Running
Adapter/Code2,123,Running
Adapter/Code2,456,Running

Install xidel and use xpath. 

In my opinion the best point of view is from serviceInstance:

xidel f.xml -e '//serviceInstance/string-join((../../@name, machine, status),",")'
Adapter/Code1,123,Running
Adapter/Code1,456,Running
Adapter/Code2,123,Running
Adapter/Code2,456,Running
added 65 characters in body
Source Link
JJoao
  • 12.8k
  • 1
  • 26
  • 45

Install xidel and use xpath. In my opinion the best point of view is from serviceInstance:

xidel f.xml -e '//serviceInstance/string-join((../../@name, machine, status),",")'
Adapter/Code1,123,Running
Adapter/Code1,456,Running
Adapter/Code2,123,Running
Adapter/Code2,456,Running

Install xidel and use xpath:

xidel f.xml -e '//serviceInstance/string-join((../../@name,machine, status),",")'

Install xidel and use xpath. In my opinion the best point of view is from serviceInstance:

xidel f.xml -e '//serviceInstance/string-join((../../@name, machine, status),",")'
Adapter/Code1,123,Running
Adapter/Code1,456,Running
Adapter/Code2,123,Running
Adapter/Code2,456,Running
Source Link
JJoao
  • 12.8k
  • 1
  • 26
  • 45

Install xidel and use xpath:

xidel f.xml -e '//serviceInstance/string-join((../../@name,machine, status),",")'