xmlstarlet uses XPath 1.0 syntax, which has limited string functions compared to XPath 2 or 3. In particular, it doesn't have an ends-with() or matches() function. If you can safely delete <TRANS_LINE> when it has a grandchild <FROM_LOCATION_CD_DISPLAY> that contains ' ADC' anywhere, you can use the contains() function, and the command would be: xmlstarlet ed -d "//TRANS_LINE[descendant::FROM_LOCATION_CD_DISPLAY[contains(., ' ADC')]]" myfile.xml (I'm assuming the '**' below are just highlighting...
The mailing list software is un-escaping the ampersand character so I can't demonstrate...
Sorry, I didn't provide the right correction: Instead of <item name="ADtv.Welcome&goodby.to.ADtv.2012">...
The problem is not with the xmlstarlet command, it is in your XML. When you have...
Jonathan, Can you give an example of a command that is not working? Also, what is...
You can use the "-i" flag to a template to create an "if" expression, and then use...
You can use the "-f" template option to print a filename, and "-i" to create an "if"...
Missing import in 2.7.0 version of tei_lite_xml.xsd