Quote:
quote:Originally posted by rajesh_css
Hi,
<Invoice>
<InvType>0</InvType>
<InvNum>111</InvNum>
</Invoice>
<Delivery>
<DeliveryType>1</DeliveryType>
<DeliveryNum>111</DeliveryNum>
<Amount>100.00</Amount>
</Delivery>
<Delivery>
<DeliveryType>1</DeliveryType>
<DeliveryNum>333</DeliveryNum>
<Amount>200.00</Amount>
</Delivery>
<Invoice>
<InvType>0</InvType>
<DeliveryNum>222</DeliveryNum>
</Invoice>
<Delivery>
<DeliveryType>1</DeliveryType>
<DeliveryNum>222</DeliveryNum>
<Amount>300.00</Amount>
</Delivery>
is this the way u r expecting
<xsl:template match="/">
<xsl:copy-of select="./node()" />
</xsl:template>
will give the result as i mentioned.here the invoice tag is ending before the delivery tag.
Raj
|
Hi Raj!
This is the source flat structure:
<Invoice>
<InvType>0</InvType>
<InvNum>111</InvNum>
</Invoice>
<Delivery>
<DeliveryType>1</DeliveryType>
<DeliveryNum>111</DeliveryNum>
<Amount>100.00</Amount>
</Delivery>
<Delivery>
<DeliveryType>1</DeliveryType>
<DeliveryNum>333</DeliveryNum>
<Amount>200.00</Amount>
</Delivery>
<Invoice>
<InvType>0</InvType>
<DeliveryNum>222</DeliveryNum>
</Invoice>
<Delivery>
<DeliveryType>1</DeliveryType>
<DeliveryNum>222</DeliveryNum>
<Amount>300.00</Amount>
</Delivery>
I expecting to the nested structure, like that:
<root>
<Invoice>
<InvType>0</InvType>
<InvNum>111</InvNum>
<Delivery>
<DeliveryType>1</DeliveryType>
<DeliveryNum>111</DeliveryNum>
<Amount>100.00</Amount>
</Delivery>
<Delivery>
<DeliveryType>1</DeliveryType>
<DeliveryNum>333</DeliveryNum>
<Amount>200.00</Amount>
</Delivery>
</Invoice>