Try this:
con.setDoOutput(true); <--- sets read/write access to
your connection (HttpURLConnection)
I use:
InputSource inSrc = new
InputSource(c.getInputStream());
SAXReader reader = new SAXReader();
outDoc = reader.read(inSrc); ---- for reading, and:
OutputFormat format = new OutputFormat("
",true,"ISO-8859-1"); // it may be UTF-8!
XMLWriter writer = new
XMLWriter(c.getOutputStream(),format);
writer.write(inDoc);
writer.flush(); ---- for writing.
I hope that I helped you,
stefka
--- [EMAIL PROTECTED] wrote:
> Send dom4j-user mailing list submissions to
> [EMAIL PROTECTED]
>
> To subscribe or unsubscribe via the World Wide Web,
> visit
>
>
https://lists.sourceforge.net/lists/listinfo/dom4j-user
> or, via email, send a message with subject or body
> 'help' to
> [EMAIL PROTECTED]
>
> You can reach the person managing the list at
> [EMAIL PROTECTED]
>
> When replying, please edit your Subject line so it
> is more specific
> than "Re: Contents of dom4j-user digest..."
>
>
> Today's Topics:
>
> 1. sending and receiving dom4j XML msgs over java
> sockets (Tim and Mary Weatherstone)
>
> --__--__--
>
> Message: 1
> Date: Wed, 29 Jan 2003 20:13:19 +0000
> From: Tim and Mary Weatherstone
> <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [dom4j-user] sending and receiving dom4j
> XML msgs over java sockets
>
> Hello
> I would be grateful to get any info re: how to
> send/receive dom4j XML
> documents over java sockets : I am using the SAX
> XMLWriter and can read
> the client-sent message as XML on the server-socket
> side, but when I
> try to write back to the client-socket it is already
> closed. Opening an
> OutputStream on the client-side after the message
> has been written,
> locks the READ on the server side. These XML docs
> are small (< 1000
> bytes) and are being carried over an internal
> network.
> Thankyou,
> Regards,
> tim.
>
>
>
>
> --__--__--
>
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/dom4j-user
>
>
> End of dom4j-user Digest
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user