6

How to parse xml file in variable-string?

view full story
linux-howto

http://www.unix.com – In the wake of the post: how-parse-following-xml-file Thank you for the very useful chakrapani response 302355585-post4 ! A close question. How to pass a file to xmllint in variable? For example, let it be: Code: NEARLY_FILE='<?xml version="1.0" encoding="iso-8859-1"?><html><set label="09/07/29" value="1241.90"/></html>' Then I want to do something like this: Code: echo 'cat /html' | xmllint --shell $NEARLY_FILE and get: Code: <html><set label="09/07/29" value="1241.90"/></html& (HowTos)