[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xml to csv

Subject: Re: xml to csv
From: Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx>
Date: Mon, 21 Nov 2005 11:32:57 +0100
Re:  xml to csv
On 11/21/05, andrew welch <andrew.j.welch@xxxxxxxxx> wrote:
<Snip/>
> You input is a bit odd though, decide how it would look normlized and
> then work from there, eg:
>
> <root>
>       <a>a</a>
>       <a>a</a>
>       <a>a</a>
>       <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>
>
> What would happen to the c's?  Would you get 4 <c>s, 4 <cc>s or 4
> <ccc>s?  Are the <a>s correct?  It's not obvious.

As far as I can see, it is only the leaf nodes that should be countet.
That is, only a, bb, ccc and dd elements.

There was a post within a month time that had the same kind of problem
- going recursively through the nodes getting a grouped output like
the one that you try getting. I could not find the thread - I think
David Carlisle answered with a solution.

I would - as Andrew said - split it into two problems: one, getting
the xml in the required format, two: as simple transformation into the
csv that you want.

Regards,
Ragulf Pickaxe :-)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.