xsl-list
[Top] [All Lists]

xml to csv

2005-11-21 01:10:49
I'm just wondering if it is possible to get the above output by using xslt. I can get solve the problem in which only one of the children of the root node has a subtree.

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"


xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>