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

Re: The subsetting has begun


xml large set of elements
On Wednesday 26 February 2003 16:23, Bullard, Claude L (Len) wrote:
> Yep.  I agree.
>
> Interestingly, some think it useful
> to strip the names on the way out, turn it
> into CSV, then restore these on the other
> end of the pipe.  It's a closed system
> of course, but one where size makes a
> difference (RF systems).

In CSV, you don't lose the names; you just put a single copy of 'em on the 
first line and don't repeat them in every line

<records>
  <record>
    <name>Alaric Snell</name>
    <gender>M</gender>
    <faveCheese>Brie</faveCheese>
  </record>
  <record>
    <name>Sarah Pym</name>
    <gender>F</gender>
    <faveCheese>Feta</faveCheese>
  </record>
   ...
</records>

->

name,gender,faveCheese
Alaric Snell,M,Brie
Sarah Pym,F,Feta

What you get with the CSV is that it's easier to type, and there are more 
tools available to process it ;-) The downside is that it can only handle a 
subset of XML documents: those that go root -> zero or more of the same 
element -> any number of child elements -> CDATA. And if the child elements 
in the penultimate level are sparse - eg, there is a large set of elements in 
use in the entire file, but only a small fraction of them are used (on 
average) on each line - then CSV can get a bit messy (lines with lots of 
,,,,,,,,)

ABS

-- 
A city is like a large, complex, rabbit
 - ARP

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.