Is there a way to map a parent node's data on a child nodes element?
I have found where other people have asked a similar question, but no
answers were given. I also looked to see if there were an Jira requests
for this, and I found one from 2004 (CASTOR-856) that wasn't
implemented, but I wasn't sure if this is because there is a work
around.
Below is an example:
TestSuite holds tests. And I want to map the test's status to the
"tests" element.
This seems like it would be a pretty common request as the XML hierarchy
often is a parent-child relationship where the children can inherit from
their parent nodes.
XML:
<testsuite>
<tests status="FAILED">
<test>test1</test>
<test>test2</test
<test>test3</test
<test>test4</test
</ tests>
<tests status="PASSED">
<test>test1</test>
<test>test2</test
<test>test3</test
<test>test4</test
</tests>
</testsuite>
Objects:
TestSuite (contains a List of Test Objects)
Test (contains a string with its status)
Can anyone show me how this would/could be mapped?