Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-04-2007, 10:27 AM
Senior Member
 
Join Date: Jun 2007
Posts: 164
Heather is on a distinguished road
XML through a socket
I'm trying to parse XML thought a socket, but I'm running into a problem...I'm using the SAXParser to parse the data. The problem is that the parse method doesn't end until the inputstream is closed or the file ends. It seems the parser was made to read from a file. When an exception is thrown, the inputstream is closed, too. Is there a way to end the parse method without closing the inputStream and Socket?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-04-2007, 10:29 AM
Senior Member
 
Join Date: Jun 2007
Posts: 130
Jack is on a distinguished road
Which way do your XML look like? I think an XML Document always have an EOF to indicate the XML String has ended?
Please post the code where you read from the socket into an inputstream
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-04-2007, 10:31 AM
Senior Member
 
Join Date: Jun 2007
Posts: 119
Peter is on a distinguished road
Did you try using StringReader and InputSource ?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply

« Api | Xml + Sax »

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Socket vortex New To Java 2 05-25-2008 07:41 AM
How to handle socket Exception mayank0512 Networking 13 01-10-2008 01:53 PM
Socket Programming (Client) JavaForums Java Blogs 0 11-26-2007 05:00 PM
Programming Socket Question paul Networking 1 07-30-2007 08:26 PM
send files through socket bbq Advanced Java 1 06-05-2007 03:08 AM


All times are GMT +3. The time now is 11:51 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org