|
From: André K. <ak...@la...> - 2010-11-21 01:16:31
|
> Le 21 nov. 10 à 00:42, msacks a écrit :
>
>
> I did try the various combinations you recommended. i.e.
>
> xmlstarlet sel -t -c "//category/....
> "/category
> "category
>
> So there must be something else I'm missing here.
>
>
> On Fri, Nov 19, 2010 at 4:17 PM, André Kaplan <ak...@la...>
> wrote:
>>> 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
>>>>
Yes, there are no name attribute with 'productNumber' as value in your
example.
There are 'productName', there are 'serialNumber', so you have to make
a choice!
$ xmlstarlet sel \
--text \
-t \
-m "//category/structure/property[@name='productName']" \
-v '@value' -n \
-b \
-b \
hp.USE808N6DS.xml
ProLiant DL580 G5
ProLiant DL580 G5
ProLiant DL580 G5
Regards,
André
|