Here is my problem.
I have below (sample)xml.
Expand|Select|Wrap|Line Numbers
- <Rules>
- <MapRule input="@PARENT()" output="Sales_Totals" />
- <MapRule input="''" output="Sales_Totals@name" />
- <MapRule input="''" output="Sales_Totals@type" />
- <MapRule input="" output="Sales_Totals@allTimeSales" />
- <MapRule input="@PARENT()" output="ProductList" />
- <MapRule input="" output="ProductList@year" />
- <MapRule input="" output="ProductList@value" />
- <MapRule input="@PARENT()" output="Product" /> ( Product node is getting created here)
- <MapRule input="" output="Product@quarter" /> ("quarter" is an attribue of Product node)
- <MapRule input="" output="Name" /> (PRoduct node has three leaf nodes - Name , Value, Sold)
- <MapRule input="" output="Value" />
- <MapRule input="" output="Sold" />
- <MapRule input="@ENDPARENT()" output="Product" /> (Product node is getting closed here)
- <MapRule input="" output="Services" />
- <MapRule input="" output="Services@lawnservice" />
- <MapRule input="@ENDPARENT()" output="ProductList"/>
- <MapRule input="@ENDPARENT()" output="Sales_Totals"/>
- </Rules>
Ex:
a) <MapRule input="@PARENT()" output="Sales_Totals" />
Here Sales_total is a node name (i.e, it is not a leaf node).
b) <MapRule input="''" output="Sales_Totals@name" />
Here "name" is an attribute of "Sales_Totals" node.
c)<MapRule input="" output="Name" />
Here attribute "input" is empty and attribute "output" does not have @ symbol , it means it is a leaf node.
I want to display the nodes and the attributes(should be followed by @ symbol) in the below way.
Expand|Select|Wrap|Line Numbers
- Sales_total
- Sales_Total@name
- Sales_Total@type
- Sales_total@allTimeSales
- Sales_TotalProductList (<- From here my problem area. )
- Sales_TotalProductList@year
- Sales_TotalProductList@value
- Sales_TotalProductListProduct
- Sales_TotalProductListProduct@Quarter
- Sales_TotalProductListProductName
- Sales_TotalProductListProductValue
- Sales_TotalProductListProductSold
- Sales_TotalProductListServices
- Sales_TotalProductListServices@lawnservice
Thanks