You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Brent G <su...@acm.org> on 2000/08/19 23:31:02 UTC

invalid unicode character

How do I get this invalid unicode character accepted by the parser? is there
an option to allow any unicode?


org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x3) was
found
 in the element content of the document.
        at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1318
)
        at
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XM
LDocumentScanner.java:634)
        at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java:1346)
        at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:381)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1208)
        at
org.apache.soap.util.xml.XercesParserLiaison.read(XercesParserLiaison
.java:85)


Re: invalid unicode character

Posted by Andy Clark <an...@apache.org>.
Brent G wrote:
> strikes me as a possibility. Is the external unparsed entity only 
> a reference or is it literally inlined within the xml object and 
> just treated in a special manner?

The unparsed entity is not inlined into the document. To get the
information you need is a little convoluted, though. First, there
will be an EntityReference node in the document with a name. The
DocumentType node contains a NamedNodeMap of entities. The entity
with the given name will have a notation name. You can then use
this name to query a NamedNodeMap of notations from the doctype
node. Finally, the Notation node contains a public/system id
pair that points to the external unparsed entity. And it's as
simple as that. ;)

-- 
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org

RE: invalid unicode character

Posted by Brent G <su...@acm.org>.
After inspection it appears a piece of my test data had a .txt extension but
was really a zip archive, so no problem.  However, if I were wanting to pass
a zip file in a DOM element, can this be achieved by passing it as an
external unparsed entity, I glazed over the reference you provided and this
strikes me as a possibility. Is the external unparsed entity only a
reference or is it literally inlined within the xml object and just treated
in a special manner?

-----Original Message-----
From: Ed Staub [mailto:estaub@mediaone.net]
Sent: Saturday, August 19, 2000 6:32 PM
To: xerces-j-dev@xml.apache.org
Subject: RE: invalid unicode character


Brent,

Did you really have a 'control-C' (0x3) character in the input?
If not, the encoding in the <?xml> header is set incorrectly (see
http://www.w3.org/TR/REC-xml#NT-EncodingDecl).

-Ed Staub

-----Original Message-----
From: Brent G [mailto:sugaree@acm.org]
Sent: Saturday, August 19, 2000 5:31 PM
To: xerces-j-dev@xml.apache.org
Subject: invalid unicode character


How do I get this invalid unicode character accepted by the parser? is there
an option to allow any unicode?


org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x3) was
found
 in the element content of the document.
        at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1318
)
        at
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XM
LDocumentScanner.java:634)
        at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java:1346)
        at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:381)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1208)
        at
org.apache.soap.util.xml.XercesParserLiaison.read(XercesParserLiaison
.java:85)


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org



RE: invalid unicode character

Posted by Ed Staub <es...@mediaone.net>.
Brent,

Did you really have a 'control-C' (0x3) character in the input?
If not, the encoding in the <?xml> header is set incorrectly (see
http://www.w3.org/TR/REC-xml#NT-EncodingDecl).

-Ed Staub

-----Original Message-----
From: Brent G [mailto:sugaree@acm.org]
Sent: Saturday, August 19, 2000 5:31 PM
To: xerces-j-dev@xml.apache.org
Subject: invalid unicode character


How do I get this invalid unicode character accepted by the parser? is there
an option to allow any unicode?


org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x3) was
found
 in the element content of the document.
        at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1318
)
        at
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XM
LDocumentScanner.java:634)
        at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java:1346)
        at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:381)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1208)
        at
org.apache.soap.util.xml.XercesParserLiaison.read(XercesParserLiaison
.java:85)


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org