Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 11th, 2007, 06:38 AM
Authorized User
 
Join Date: Oct 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default SAX Exception - Public identifier

Hi Michal,

 I'm trying to fire an xml request on to a jsp where it is parsed and the jsp submits to a struts action but i'm getting the following error : "org.xml.sax.SAXParseException: White space is required between the public identifier and the system identifier". Can you throw some light on this please.

Thanks.



 
Old December 11th, 2007, 06:54 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

The exception seems fairly self explanatory, but without seeing some of the actual XML its trying to process I couldn't be more helpful. Its likely to be in an ENTITY reference I think, but not positive.

/- Sam Judson : Wrox Technical Editor -/
 
Old December 11th, 2007, 07:06 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Please don't address questions to specific people - that's not how forums work.

Production [75] in the XML Recommendation says

ExternalID ::= 'SYSTEM' S SystemLiteral |
               'PUBLIC' S PubidLiteral S SystemLiteral

The "S" is a mandatory space. The message means you left out the space between the PubidLiteral and the SystemLiteral.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old December 11th, 2007, 08:10 AM
Authorized User
 
Join Date: Oct 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think i get your point but i dont seem to understand where i have to include this in my XML. if a little more detailed explanation is available it would be more helpful.

Thanx.

 
Old December 11th, 2007, 08:27 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You haven't shown us your XML, so we can't tell you where it's wrong.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old December 11th, 2007, 08:34 AM
Authorized User
 
Join Date: Oct 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi Michael

i m fireing following XMl to my localserver


<?xml version="1.0" encoding="UTF-8"?>
<PreFraudScoutRQ>
  <stock>
    <symbol>SUNW</symbol>
    <name>Sun Microsystems</name>
    <price>17.1</price>
  </stock>
  <stock>
    <symbol>AOL</symbol>
    <name>America Online</name>
    <price>51.05</price>
  </stock>
  <stock>
    <symbol>IBM</symbol>
    <name>International Business Machines</name>
    <price>116.10</price>
  </stock>
  <stock>
    <symbol>MOT</symbol>
    <name>MOTOROLA</name>
    <price>15.20</price>
  </stock>
</PreFraudScoutRQ>

 
Old December 11th, 2007, 08:55 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Well in that case your 'localserver' must be adding to it, as there is nothing obviously wrong with that...

/- Sam Judson : Wrox Technical Editor -/
 
Old December 11th, 2007, 09:40 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Sounds like you need to explain much more carefully what you mean by the phrase "I'm trying to fire an xml request on to a jsp where it is parsed"

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
public article - public articledetails _keysersoze_ BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 September 8th, 2007 08:38 AM
ch12 sax humayunlalzad BOOK: Beginning XML 3rd Edition 1 May 5th, 2007 10:19 AM
how to use sax parser pavanntcs XSLT 3 September 13th, 2006 02:02 AM
problem with validating sax parser vijay3000 XML 1 April 18th, 2006 10:15 AM
SAX Parser Error dpan168 XML 0 October 26th, 2004 04:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.