Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My xsl looks like
<tns:Items>
	<tns:Item>
		<tns:InvoiceNumber>100001</tns: InvoiceNumber >
		<tns:ItemName>Chairs</tns: ItemName >
		<tns:ItemValue>28</tns: ItemValue >
		
		</tns:Item>
		<tns:Item>
		<tns:InvoiceNumber>100001</tns: InvoiceNumber >
		<tns:ItemName>screws </tns: ItemName >
		<tns:ItemValue>56</tns: ItemValue >
		
		</tns:Item>

	</tns:Items>



How can I map this to my xsl. I have same Invoice number but the itemName and Value will change for each loop
Posted
Updated 8-Aug-12 16:25pm
v2

1 solution

You have two options :
- either you use one of the xsl iteration routines :
http://www.w3schools.com/xsl/xsl_for_each.asp[^]
- or you use a template match :
http://www.w3schools.com/xsl/xsl_apply_templates.asp[^]
and
http://www.w3schools.com/xsl/el_template.asp[^]

And consider reading a tutorial about this stuff. If you don't know how to get started with a simple example like this, you just don't understand enough about xsl to begin with.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900