I'm trying to figure out how to nest metadata in a custom structure, I've figured out how to create nodes and access the namespace, but from there I can't figure out how to create parent child structure and only siblings. Apologies for not having my actual script on hand, I can update with it from work, but would like to know if this is at all possible, preferentially I just add the data direct and don't have to write to a file import and delete, but if that's easiest I'm open to the recommendation.
Currently I'm getting:
<Parent Property>Value</Parent Property>
<Child 1>1</Child 1>
<Child 2>2</Child 1>
<Child 3>3</Child 1>
Where I want it to be like the below:
<Parent Property>
<Child 1>1</Child 1>
<Child 2>2</Child 1>
<Child 3>3</Child 1>
</Parent Property>
Is this possible via photoshop scripting on an open file simply with their functions? Is it easier to write an XML file through scripting and simply insert it into the header?