Retrieve attribute value from parent and display it as an attribute in the child

leipeic

New Member
\[code\]<Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Package ID="b7137f22-31da-4d90-971c-b6baad654c96" BusinessID="P_000137" Path="/Package/Product/Launch_Entity" xsi:type="Package_Private_Line"> <Category_ID Product_Line_ID="63">63</Category_ID> <Compatibility_Rules ID="32fd84b4-7b9b-40e2-8265-8e2e4f856a8d"> <Rule_Event ID="992f04cb-6bd1-42bb-9578-87793dd38aca"> <Name>Entity Selection</Name> </Rule_Event><Rule_Name>Private Line Exclusions</Rule_Name> <Rule_Statement ID="d0cc0700-2199-4a51-af68-72dfe27d878f"> <Description>IF package is Private line THEN exclude Ethernet Switched Access (ESA)</Description> <Actions ID="d8165dda-7f8b-4c44-8400-eb081c0ec79c"> <Then>THEN exclude Ethernet Switched Access (ESA</Then> <Entity>PSpec_000164</Entity><Operand ID="f74c6bf3-2718-4f8c-90e1-ead1257edc3a"> <Name>EXCLUDE</Name> </Operand></Actions> <Conditions ID="12dd11ea-bfe7-4ef3-b35c-f06cc90b1b6b"> <If>IF package is Private Line</If> <Operand ID="8d041d93-77c7-46ac-938d-753596b8535c"> <Name>EXISTS</Name> </Operand> <Entity>P_000137</Entity> </Conditions></Rule_Statement> </Compatibility_Rules></Package></Root>\[/code\]The above is the XML I am trying to transform. I need to display the Compatibility_Rules as:\[code\]<attribute><name>Compatibility Rules</name><value GUID="b7137f22-31da-4d90-971c-b6baad654c96"></value>\[/code\]The GUID above is the ID attribute of Package. I have no clue how can this be achieved.
 
Back
Top