RE: XML to CSV

This list is for comments on the XSL and XPath 1.0 specifications. 

For advice on XSLT coding, please use the xsl-list at
http://www.mulberrytech.com/

Thank you.

Michael Kay


> -----Original Message-----
> From: xsl-editors-request@w3.org 
> [mailto:xsl-editors-request@w3.org] On Behalf Of Serena Phan
> Sent: 22 November 2005 02:08
> To: xsl-editors@w3.org
> Subject: XML to CSV
> 
> 
> Hi,
> 
> I'm just wondering if it is possible to get the output below 
> by using xslt. 
> I can get solve the problem in which only one of the children 
> of the root 
> node has a subtree (i.e only <b> has children) but not the 
> case where <c> 
> and <d> have children as well.
> 
> Any advice is greatly appreciated.
> 
> Thanks.
> 
> Input:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> 	<a>a</a>
> 	<b>
> 		<bb>bb1</bb>
> 		<bb>bb2</bb>
> 		<bb>bb3</bb>
> 		<bb>bb4</bb>
> 	</b>
> 	<c>
> 		<cc>
> 			<ccc>ccc1</ccc>
> 		</cc>
> 		<cc>
> 			<ccc>ccc2</ccc>
> 		</cc>
> 	</c>
> 	<d>
> 		<dd>dd1</dd>
> 		<dd>dd2</dd>
> 	</d>
> </root>
> 
> Output:
> 
> "a",	"bb1",	"ccc1",	"dd1"
> "a",	"bb2",	"ccc1",	"dd1"
> "a",	"bb3",	"ccc1",	"dd1"
> "a",	"bb4",	"ccc1",	"dd1"
> "a",	"bb1",	"ccc2",	"dd1"
> "a",	"bb2",	"ccc2",	"dd1"
> "a",	"bb3",	"ccc2",	"dd1"
> "a",	"bb4",	"ccc2",	"dd1"
> "a",	"bb1",	"ccc1",	"dd2"
> "a",	"bb2",	"ccc1",	"dd2"
> "a",	"bb3",	"ccc1",	"dd2"
> "a",	"bb4",	"ccc1",	"dd2"
> "a",	"bb1",	"ccc2",	"dd2"
> "a",	"bb2",	"ccc2",	"dd2"
> "a",	"bb3",	"ccc2",	"dd2"
> "a",	"bb4",	"ccc2",	"dd2"
> 
> _________________________________________________________________
> Don't just search. Find. Check out the new MSN Search! 
> http://search.msn.com/
> 
> 
> 
> 

Received on Tuesday, 22 November 2005 15:35:59 UTC