>It might help to discuss examples. You said lshw is already extracting
>the info you want (which is good). Can you paste a piece of the XML
>showing it? Which XML element does lshw put it into?

 
using my laptop as an example.
$ lshw -xml

the node info for firmware is

</node>
<node id="firmware" claimed="true" class="memory" handle="">
 <description>BIOS</description>
 <vendor>LENOVO</vendor>
 <physid>31</physid>
 <version>N14ET26W (1.04 )</version>
 <date>01/23/2015</date>
 <size units="bytes">131072</size>
 <capacity units="bytes">16711680</capacity>
 <capabilities>
  <capability id="pci" >PCI bus</capability>
  <capability id="pnp" >Plug-and-Play</capability>
  <capability id="upgrade" >BIOS EEPROM can be upgraded</capability>
  <capability id="shadowing" >BIOS shadowing</capability>
  <capability id="cdboot" >Booting from CD-ROM/DVD</capability>
  <capability id="bootselect" >Selectable boot path</capability>
  <capability id="acpi" >ACPI</capability>
  <capability id="usb" >USB legacy emulation</capability>
  <capability id="biosbootspecification" >BIOS boot specification</capability>
  <capability id="uefi" >UEFI specification is supported</capability>
 </capabilities>
</node>

I was just pulling from the version and date tags.

from lxml import etree
inventory = etree.parse('test.xml')

sysfwinfo = inventory.xpath('.//node[@id="firmware"]')[0]
sysfw = dict(version = sysfwinfo.findtext('version'),
             date = sysfwinfo.findtext('date'))


hope that helps. Shawn
--

Shawn Doherty

Software Engineer, Kernel-HW

Red Hat

314 Littleton Rd

Westford, MA 01886

sdoherty@redhat.com    T: 19785891080 INTERNAL:-8131080     IM: sdoherty