Fwd: [jdom-interest] SAXBuilder.build() weirdness

Bob Tarling bobtarling at hotmail.com
Wed Jul 18 15:47:28 PDT 2001


John Muhlestein wrote:
>There seems to be a difference of opinion about what "should"
>be happening.
Well I've only got to the point of writing my first simple client/server 
application with XML. By pure conincidence I'd managed to get _something_ 
working just before I saw your email so thought I'd chip in. It's a way of 
doing it for me with simple client/server applications but I've yet to come 
across HTTP POST and don't know of any implication here. Basically I'm 
saying don't listen to the newbie too much cos I'm groping in the dark a bit 
myself.

Elliotte Rusty Harold wrote:
>No, unless there's something weird going on.....
I'm curious to know if the solution I've found for my client/server 
applications is wrong or is just wrong in the context for John. I was happy 
to get it working but I'd be pleased to know if there is a better way of 
achieving the same thing.

A previous attempt on my own solution had me sending a character count 
before the document and doing more like the FAQ. I modified this when 
someone pointed out that I only know the character count because my example 
deals with disk files. If I had been sending the stream out from an 
XMLOuputter in the client then how would I know up front how many characters 
would be in that stream. The FAQ requires a known array size, I simply 
modified this to use a string instead.

I couldn't close the output stream from the client because this closed the 
socket. The server couldn't then respond back to the client with any results 
it had generated.

Should I actually be layering another level of technology on top of what I 
have here (HTTP POST?) to help me handle this?

As I've said before I'm pretty new to the technologies here. Taught myself 
sockets from Bruce Eckels "Thinking in Java" and learnt how to read XML from 
Jason & Bretts 2 articles on JavaWorld. I'm just at the bottom of the 
ladder. Where would you suggest I go from here (articles/books) to get an 
understanding of more complex XML comms?

I hope someone has the patience to set me straight.

Regards

Bob.

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




More information about the jdom-interest mailing list