lshw -xml -C network >out.xml does not generate a valid xml document
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
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu lshw Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Mike Neiderhauser for more information if necessary.