File: ed-insert

package info (click to toggle)
xmlstarlet 1.6.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,656 kB
  • sloc: sh: 4,735; ansic: 4,187; xml: 1,936; makefile: 66; awk: 43
file content (4 lines) | stat: -rwxr-xr-x 171 bytes parent folder | download | duplicates (6)
1
2
3
4
#!/bin/sh
./xmlstarlet ed -i '/xml/table/rec[@id=1]' -t attr -n first -v yes xml/table.xml
# insert empty element
./xmlstarlet ed -i '/foo' -t elem -n first xml/entity.xml