Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

White spaces are required between publicId and systemId

843834Jun 26 2003 — edited Aug 12 2009
Hello,

I'm new to Java/XML and have been searching the XML forums for a viable answer trying to get around this error
"White spaces are required between publicId and systemId"

I'm a little unsure of this, however my understanding of this error is that "whitespace" must exist between my "tag entities". So I have modified my XML document to include white space between entities...below is a snippet of my XML doc
// Begin snippet...
<auth>
<userid>
12345
</userid>
<first>
first value
</first>
<second>

</second>
</auth>
//End snippet
Below is the fragment of code I use to set up and parse the XML parse
//....
      SAXParserFactory spf = SAXParserFactory.newInstance();
      //spf.setNamespaceAware(true);

      SAXParser saxParser = spf.newSAXParser();
      XMLReader parser = saxParser.getXMLReader();

      urlConnection = url.openConnection();

      in = urlConnection.getInputStream();
      ins = new InputSource( in );

      // create a handler
      Handler handler = new Handler();
      handler.setBVSessionData( bvdata );

      // assign the handler to the parser
      parser.setContentHandler(handler);

      parser.parse( ins ); // SAXException is thrown here...what gives??
//...
In addition, I'm able to read the XML file fine if I point the URL to the XML file locally on my PC, however when the XML doc is served by a web server over HTTP, then read by my app, the SAXException is thrown. Any insight or examples is greatly appreciated. Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 9 2009
Added on Jun 26 2003
6 comments
7,859 views