[jdom-interest] XMLOutputter and newlines
afterdeclaration/doctype
Elliotte Rusty Harold
elharo at metalab.unc.edu
Thu Dec 19 09:47:34 PST 2002
At 11:37 AM -0500 12/19/02, <Vadim.Strizhevsky at morganstanley.com> wrote:
>1) Because its not valid XML as I desire to store multiple mesages in
>single file.
Then JDOM won't help you. JDOM is about XML.
>2) performance.
You've done the testing necessary to prove that XML parsing is a problem?
>In a specific concrete example I need to have a log of all messages that
>went through the system per day,I then need an efficent/quick way to
>replay these messages through the system. The system is fed messages over
>the network, It doesn't make sense to read the file with XML parser as I
>just need to send bytes over the wire. Something needs to read this
>log and feed the system one message a time. Breaking the file apart on a
>newline is easier/quicker than searching for <?xml... separation.
Sounnds like you're trying to use XML like a database, always a mistake.
>You present an argument of human readability. But in reality humans
>don't actually read XML that much in my world. They usually use tools to
>display the particular XML in custom/convinient way. However what
>happens more often is that various systems/programs pass XML between them
>over various media, (network, MQ, files, etc...) As far those system
>concerned they don't care what it looks like, but may care how much space
>it occupies. Yea 4bytes is not huge deal, but in principle you
>trying to represent xml as concisely as possible, but you just can't
>completely do it.
>
That's your principle, not mine. Excessive worrying about size can be
just as damaging as excessive worrying about speed. Fact is, in
almost any application you're going to waste more on the empty space
in disk blocks or even network packets than you're talking about
saving.
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| XML in a Nutshell, 2nd Edition (O'Reilly, 2002) |
| http://www.cafeconleche.org/books/xian2/ |
| http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
More information about the jdom-interest
mailing list