[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xml-dev] DOM or SAX: Sense and Sensibility
----- Original Message -----
From: "Subrahmanyam Allamaraju" <firstname.lastname@example.org>
> Al Snell wrote:
> > On Wed, 7 Nov 2001, Bullard, Claude L (Len) wrote:
> >>How often do you as experienced XML developers
> >>find people in your shop using DOM for work
> >>more appropriate to SAX? Have you asked
> >>them why and what do they say? What are the
> >>costs of picking the wrong API?
> > Even worse, one I've seen in processing pipelines is converting to
> > XML (as a big in-memory string) then passing it into the next stage to
> > reparsed!
So shame on UNIX and perl and any other reasonable
processing pipeline? For ages, those stupid UNIX
developers are serializing some data into strings and
then split those strings with regular expressions into
internal data structures and then serialise the internal
data structures into strings and then again ...
Guys, what's wrong with that? What's the alternalive
that you have for this 'worse' practice? Maybe you think
that serialization into 'XML string ' is different from
serialization into 'comma separated value string' ?
I'd *love* to see *particular* testcases in XML-DEV
list, rather than useless speculations about "inexperienced
developers don't get XML and XSLT".
> The same with data binding:
> [Textual XML -> Deserialize to Instance Tree -> Process -> Serialize to
> XML] and [the same] and [the same] ...
> Is there an alternantive when these pipelines are distributed?
What do you want, really? You want to pass some
object *not* serializing/deserializing it into XML?
How can you *possibly* pass some object down the wire
or from one programm to another *not* turning that
object into sequence of bits and bytes?
If there is no magic involved, you need to turn
your data into bits and bytes representation.
There is one possible representation, called XML.
You don't like it? There are plenty of binary
alternatives ( but I think they are offtopic for
XML-dev mailing list ).
You don't like binary serializations, but
don't like textual XML serialization as well?
There is a broad specter of possible approaches,
starting from comma separated values and ending
You want to keep XML infoset, but save 10% on
XML parsing ?
1. Use PXML subset ( write a parser for it, should
take one day ).
2. Write XML as a stream of SAX events and bypass
it, like Cocoon did long time ago, e t.c.
e t.c. e t.c.
There is plenty of ways to solve the problem,
but I don't see any *problem* in your letter, so I can only
guess why it suddenly becomes a bad practice to
bypass data, serializing them as XML.
What is the problem you, guys, have with XML
What is more redistributable than text file, and why
XML text file is 'bad text file'? ( Well, I know why XML is bad.
Only PXML subset of it should be used to avoid
macroprocessing craziness and to remove the overhead)
I really don't get it, it is when people say things like :
"look - internal structures are serialized/deserialized into XML!"
Of course! How else can it be? What is your point? What is the