Extracting and dumping elements using xmlstarlet
问题 I am looking for a way to extract and print an element from my xml using xmlstarlet; for example if my xml is <?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book> <title lang="eng">Harry Potter</title> <price>29.99</price> </book> <book> <title lang="eng">Learning XML</title> <price>39.95</price> </book> </bookstore> I would like to print out book element with price = 29.99 as: <book> <title lang="eng">Harry Potter</title> <price>29.99</price> </book> I understand the xpath query to