Yes, we can create tree structure control in InfoPath. Our xml looks like below then we can design tree structure format.
<ParentNode>
<ChildNode name="Value" selected="false">
<NodeName selected="false">Value</NodeName>
<NodeName selected="false">Value</NodeName>
</ChildNode>
<ChildNode name="Value" selected="false">
<NodeName selected="false">Value</NodeName>
<NodeName selected="false">Value</NodeName>
</ChildNode>
</ParentNode>
In this Value is node name and selected is checkbox field.
1. Repeating (ChildNode) section contains, selected is checkbox field and Value is expression box field
2. You need to add one more repeating (NodeName) section with selected is checkbox and Value is expression box.
3. You need keep conditional formatting “Any occurrence of selected is true#%92 for second repeating(NodeName) section
Whenever you select first check box it displays child nodes of that parent node.