I want to parse below wmi output to hashmap as a key value pair using java.Please give me suggestions ..
My WMI Output contains 2 rows with multiple columns, first row is header and second row contains data. I want either regex or any approach to seperate the header with corresponding data as a key value for hashmap.
I am not getting any idea how to proceed…
Caption Description IdentifyingNumber Name
Computer System Product Computer System Product HP xw4600 Workstation
Parsing output should be like …
Key = Value
Caption = Computer System Product
Description = Computer System Product
IdentifyingNumber =
Name = HP xw4600 Workstation
I formatted the wmi output as a list and now its easy to formate the output.