lshw -xml output invalid

Bug #1013964 reported by Mike Neiderhauser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lshw (Ubuntu)
New
Undecided
Unassigned

Bug Description

running the command ("lshw -xml -C network >out.xml") in terminal does not produce a valid xml document if more than 1 networking adapter is present.

you get something like

--------------------------------------------------------
<?xml version="1.0" standalone="yes" ?>
<node>
  <other elements>
</node>

<node>
  <other elements>
</node>
-------------------------------------------------------

running this xml file through a xml parser (such as a xml dom parser in MONO) throws an exception saying that you cannot have more than one top level element. In this case 2 node elements. If my understanding of XML is correct, there needs to be some type of root wrapper around the node elements to make this a vaild document.

The output should be something like...
--------------------------------------------------------
<?xml version="1.0" standalone="yes" ?>
<MY_ROOT>
  <node>
    <other elements>
  </node>

  <node>
    <other elements>
  </node>
</MY_ROOT>
-------------------------------------------------------

where the MY ROOT element was added as a single top level of the document

Can someone else verify this? I am running Ubuntu 12.04 LTS.

If this is an issue how can we go about fixing it?

Thanks all

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.