0

I have a string below like this:

<ReportFilters><Index>data_dictionary</Index><Type>DataDictionary</Type><Field>category</Field><Count>30</Count></ReportFilters><Dialogs><Dialog filterField="category" height="400" left="45" resize="true" top="50" width="700">dictionary_dialog4</Dialog></Dialogs>

how can i get substring dictionary_dialog4 from above mentioned string using sed or any other operation, the string is in variable not in file

Thanks, Shiva.

M Siva
  • 11
  • 1
  • `xmllint` with `xpath` works for you? see http://stackoverflow.com/questions/15461737/how-to-execute-xpath-one-liners-from-shell – Rao Oct 18 '16 at 03:51
  • --xpath is not found in that machine and I should not install anything new on the same machine – M Siva Oct 18 '16 at 09:33
  • If you have seen the link, it is clear that `xpath` is an option to `xmllint` which is mostly available on linux. – Rao Oct 18 '16 at 10:17

0 Answers0