XML to CSV
- From: "Serena" <serena.phan@xxxxxxxxxxx>
- Date: 21 Nov 2005 20:13:36 -0800
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 will be 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"
.
- Follow-Ups:
- Re: XML to CSV
- From: William Park
- Re: XML to CSV
- Prev by Date: Re: non-deterministic content model in xsd
- Next by Date: Re: XML to CSV
- Previous by thread: non-deterministic content model in xsd
- Next by thread: Re: XML to CSV
- Index(es):
Relevant Pages
|