xmlから欲しい値をとりだす

環境 Windows10 Ubuntu bash

sed -e "s/xmlns=/ignore=/" h26.xml | xmllint --xpath '/ClinicalDocument/author/assignedAuthor/

representedOrganization/addr/postalCode/text()' -

まず

sed -e "s/xmlns=/ignore=/" h26.xml

で 無効にする

 

/ClinicalDocument/author/assignedAuthor/

representedOrganization/addr/postalCode/text()'

Xpathで指定してテキストで取り出す

最後必ず-をつける