generating xml-structured file beside the generated xmi file [message #839844] |
Mon, 09 April 2012 05:27  |
Eclipse User |
|
|
|
Hello All,
I'm trying to generate xml-structured file beside the already generated xmi file, the problem is i got lots of nested elements...so i need to loop for all the created elements and create the file accordingly.
Is there any way that i could loop for all the created elements after saving the file not while writing and modifying it? (because while writing is going to be kinda messy)
below you can find the generated XMI structure, my structure should be quite similar too:
<?xml version="1.0" encoding="UTF-8"?>
<umlt:ModelUMLT>
<packagedElement xsi:type="umlt:PackageUMLT">
<packagedElement xsi:type="umlt:TransformationActivity">
<node xsi:type="umlt:StructuredTransformation">
<node xsi:type="umlt:TransformationAction">
<ownedMapping>
<ownedAssignmentDef name="a.b:=7">
<ownedExpression xsi:type="uml:Expression">
<name xsi:nil="true"/>
<symbol xsi:nil="true"/>
<operand xsi:type="uml:OpaqueExpression">
<name xsi:nil="true"/>
</operand>
<operand xsi:type="uml:OpaqueExpression">
<body xsi:nil="true"/>
</operand>
</ownedExpression>
</ownedAssignmentDef>
<ownedAssignmentDef name="a.b.c:=3">
<ownedExpression xsi:type="uml:Expression">
<name xsi:nil="true"/>
<symbol xsi:nil="true"/>
<operand xsi:type="uml:OpaqueExpression">
<name xsi:nil="true"/>
</operand>
<operand xsi:type="uml:OpaqueExpression">
<body xsi:nil="true"/>
</operand>
</ownedExpression>
</ownedAssignmentDef>
</ownedMapping>
</node>
<node xsi:type="umlt:TransformationAction">
<ownedMapping>
<ownedAssignmentDef name="a.b.c.d:=15">
<ownedExpression xsi:type="uml:Expression">
<name xsi:nil="true"/>
<symbol xsi:nil="true"/>
<operand xsi:type="uml:OpaqueExpression">
<name xsi:nil="true"/>
</operand>
<operand xsi:type="uml:OpaqueExpression">
<body xsi:nil="true"/>
</operand>
</ownedExpression>
</ownedAssignmentDef>
</ownedMapping>
</node>
</node>
</packagedElement>
</packagedElement>
</umlt:ModelUMLT>
Thanks in Advance and happy easter:)
Mostafa.
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05779 seconds