For xml parsing from the command line, xmlstartlet and xidel require the ‘-‘ switch at the end to read from stdin. This has to be used during piping
curl http://gist.bbldtl.int:9000/ema/HUBQ1\?page\=log\&message_id\=52285748 | xidel -e '//pre' -
Or:
curl http://gist.bbldtl.int:9000/ema/HUBQ1\?page\=log\&message_id\=52285748 | xmllint --format --xpath '//pre' -
xidel removes the enclosing tags by default. So that’s better.
No comments:
Post a Comment