This is a companion discussion topic for the original entry at https://kni.me/w/lGLFj-EdlfaDurxa
This is a companion discussion topic for the original entry at https://kni.me/w/lGLFj-EdlfaDurxa
Example XML with missing values
<root>
<childs>
<child ID="Classification root" ParentID="">
<Name>Classification root</Name>
</child>
<child ID="child1" ParentID="">
<Name>Inactive child</Name>
<data>
<value AttributeID="PartOfContext"/>
</data>
</child>
<child ID="grand-child1-1" ParentID="child1">
<Name>Inactive grand-child 1.1</Name>
<data>
<value AttributeID="PartOfContext"/>
</data>
</child>
<child ID="child2" ParentID="Classification root">
<Name>Active child 2</Name>
<data>
<value AttributeID="PartOfContext">Yes</value>
</data>
</child>
<child ID="grand-child2-1" ParentID="child2">
<Name>Inactive grand-child 2.1</Name>
<data>
<value AttributeID="PartOfContext">Yes</value>
</data>
</child>
</childs>
</root>
Expected results
ID | Parent ID | PartOfContext |
---|---|---|
Classification root | ? | ? |
child1 | Classification root | ? |
grand-child1-1 | child1 | ? |
child2 | Classification root | Yes |
grand-child2-1 | child2 | Yes |
Given result
ID | Parent ID | PartOfContext |
---|---|---|
Classification root | child1 | Yes |
child1 | Classification root | Yes |
grand-child1-1 | child2 | ? |
child2 | ? | ? |
grand-child2-1 | ? | ? |