Skip to main content
improved explanation
Source Link

This is one way:

xml = ImportString["the provided complete xml", "XML"]; 

Part 2 of the imported xml the actual data. This skips skipping the xml version and encoding. Then repeatedly apply a rule and convert to a dataset:

ds = xml[[2]] // ReplaceRepeated[XMLElement[tag : _String, attrs : _List, value : _List] :> <|"tag" -> tag, "attributes" -> <|attrs|>, "value" -> value|>] // Dataset 

this is the resulting dataset:

enter image description here

drill down to the value of the Readconfig tag:

enter image description here

drill down to the deepest level:

enter image description here

This is one way:

xml = ImportString["the provided complete xml", "XML"]; 

Part 2 of the imported xml the actual data. This skips the xml version and encoding:

ds = xml[[2]] // ReplaceRepeated[XMLElement[tag : _String, attrs : _List, value : _List] :> <|"tag" -> tag, "attributes" -> <|attrs|>, "value" -> value|>] // Dataset 

this is the resulting dataset:

enter image description here

drill down to the value of the Readconfig tag:

enter image description here

drill down to the deepest level:

enter image description here

This is one way:

xml = ImportString["the provided complete xml", "XML"]; 

Part 2 of the imported xml the actual data skipping the xml version and encoding. Then repeatedly apply a rule and convert to a dataset:

ds = xml[[2]] // ReplaceRepeated[XMLElement[tag : _String, attrs : _List, value : _List] :> <|"tag" -> tag, "attributes" -> <|attrs|>, "value" -> value|>] // Dataset 

this is the resulting dataset:

enter image description here

drill down to the value of the Readconfig tag:

enter image description here

drill down to the deepest level:

enter image description here

Source Link

This is one way:

xml = ImportString["the provided complete xml", "XML"]; 

Part 2 of the imported xml the actual data. This skips the xml version and encoding:

ds = xml[[2]] // ReplaceRepeated[XMLElement[tag : _String, attrs : _List, value : _List] :> <|"tag" -> tag, "attributes" -> <|attrs|>, "value" -> value|>] // Dataset 

this is the resulting dataset:

enter image description here

drill down to the value of the Readconfig tag:

enter image description here

drill down to the deepest level:

enter image description here