I got this particular XML file, it looks like this:
<App01_Storage Type="VOLATILE" Size="200000" Speed="15" LatencyMaxWrite="1" LatencyMaxRead="2" Endurance="12" WorkloadPeak="15" />
In my program I iterate through all children of the root node. My intention is to get all children with their Attributes + values. One child looks like the code above.
System.out.println(node.getName());
System.out.println(node.getAttributes());
The System.Out-Method gives me this Output:
App01_Storage
[[Attribute: Type="VOLATILE"], [Attribute: Size="200000"], [Attribute: Speed="15"], [Attribute: LatencyMaxWrite="1"], [Attribute: LatencyMaxRead="2"], [Attribute: Endurance="12"], [Attribute: WorkloadPeak="15"]]
I guess I am on the right way. According to my understanding one attribute should look like that: Attribute.Name = Attribute.Value
I want to save the attributes plus values in a different class and dont know how I exactly can get the values plus the name separetaly. The Output I get right now is a List with each entry Attributename = Attributevalue, like one single String. With this single String i cannot work.
Am I seeing something wrong? Hopefully I could explain myself. Thanks a lot:)