linux - Get URL from XML node with xmllint, add new line -
i extracting url's xml file command:
xmllint --xpath '//root/item/photo/text()' xml_2015-05-13-20\:39.xml
it works, output mass text of url's:
http://1.jpghttp://2.jpghttp://3.jpghttp://4.jpghttp://5.jpghttp://6.jpg
it possible add \n
new line character after each match?
xml:
<root> <item> <photo>http://1.jpg</photo> </item> <item> <photo>http://2.jpg</photo> </item> </root>
here possible way whit xidel:
xidel -e "//root/item/photo/text()" -q ./my.xml > ./processed_xml
Comments
Post a Comment