Timeline for Parse XML to get node value in bash script?
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 18, 2013 at 7:35 | comment | added | MagePsycho | Guys thanks for your input so far. But I can't use any extension as the server is not on our control. So I was thinking if there is harcoded way to get the values from that path, may be using grep/eval etc? Thanks again. | |
Jul 17, 2013 at 17:02 | comment | added | Charles Duffy | @MagePsycho Thank you for including sample data in the question; I've tested the code given against it, and updated the surrounding text appropriately. | |
Jul 17, 2013 at 17:01 | history | edited | Charles Duffy | CC BY-SA 3.0 | deleted 172 characters in body |
Jul 17, 2013 at 16:05 | comment | added | Charles Duffy | @MagePsycho I was about to post the same link terdon already did. In short: No. | |
Jul 17, 2013 at 15:57 | comment | added | terdon♦ | @MagePsycho you can just install xmlstarlet. In any case, you should never use regular expressions to parse (X)HTML. | |
Jul 17, 2013 at 15:51 | comment | added | MagePsycho | @CharlesDuffy is there a way to get the value may be using regex pattern or else? | |
Jul 17, 2013 at 15:48 | comment | added | Charles Duffy | @MagePsycho bash does not have any built-in support for XML parsing. You either need to have a tool that does (xmlstarlet, xsltproc, a modern Python, etc), or you can't parse XML correctly. | |
Jul 17, 2013 at 15:36 | review | First posts | |||
Jul 17, 2013 at 15:38 | |||||
Jul 17, 2013 at 15:31 | comment | added | MagePsycho | xmlstarlet: command not found, so this command is not useful to me :( | |
Jul 17, 2013 at 15:18 | history | answered | Charles Duffy | CC BY-SA 3.0 |