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.