From: Noam P. <npo...@us...> - 2010-11-19 22:17:00
|
On Fri, Nov 19, 2010 at 3:59 PM, msacks <nt...@gm...> wrote: > Hello, > I am having trouble doing some really basic things using xmlstar. > I am executing this command /usr/bin/xmlstarlet sel -t -c > "category/structure/property[@name='productNumber']" -v "@value" > ~user/Downloads/hp.USE808N6DS.xml > > against this xml file > https://docs.google.com/leaf?id=0B6C4Iz1C9X9HMzVjNjRiMTYtZWM3YS00ODljLTgyM2EtMDNjYzIzZjVhYTE2&sort=name&layout=list&num=50 > > Can someone clue me in as to what I am doing wrong? You didn't explain exactly what your intention is, but I suppose you meant @value to refer to the property element that you matched in the previous argument. Unless you use -m (or --match) arguments are relative to the root, I would guess you want this: /usr/bin/xmlstarlet sel -t -m \ "category/structure/property[@name='productNumber']" \ -c . -v "@value" ~user/Downloads/hp.USE808N6DS.xml Noam PS I was unable do download your xml file, I got: Sorry, the page (or document) you have requested is not available. |