You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by cbowditch <bo...@hotmail.com> on 2008/02/05 13:57:00 UTC

Debugging invalid character event - Progress

Hi,

following on from my post last week I have discovered that the content
scanning debug is only output if I call setNamespaceAware(false) on
SAXFactory. I can't see why this would be the case looking at the code - the
NSContentDispatcher appears to call scanStartElement in
XMLNSDocumentScannerImpl which has System.out calls too.

When I call Xerces to parse the XML in a test Application I get the
following output on stdout:

>>> scanStartElement()
<ContraAccountNumber1><<< scanStartElement(): false
### setScannerState: SCANNER_STATE_CONTENT
characters(start=1087, length=16)### setScannerState:
SCANNER_STATE_START_OF_MAR
KUP
>>> scanEndElement()
</ContraAccountNumber1>### setScannerState: SCANNER_STATE_CONTENT
### setScannerState: SCANNER_STATE_START_OF_MARKUP
>>> scanStartElement()
<ContraAccountNumber2><<< scanStartElement(): false
### setScannerState: SCANNER_STATE_CONTENT
### setScannerState: SCANNER_STATE_START_OF_MARKUP
>>> scanEndElement()
</ContraAccountNumber2>### setScannerState: SCANNER_STATE_CONTENT
### setScannerState: SCANNER_STATE_START_OF_MARKUP
>>> scanStartElement()
<ContraAccountNumber3><<< scanStartElement(): false
### setScannerState: SCANNER_STATE_CONTENT
### setScannerState: SCANNER_STATE_START_OF_MARKUP
>>> scanEndElement()
</ContraAccountNumber3>### setScannerState: SCANNER_STATE_CONTENT
### setScannerState: SCANNER_STATE_START_OF_MARKUP
>>> scanStartElement()
<ContraAccountNumber4><<< scanStartElement(): false
### setScannerState: SCANNER_STATE_CONTENT
### setScannerState: SCANNER_STATE_START_OF_MARKUP
>>> scanEndElement()
</ContraAccountNumber4>### setScannerState: SCANNER_STATE_CONTENT
### setScannerState: SCANNER_STATE_START_OF_MARKUP
>>> scanStartElement()
<ContraAccountNumber5><<< scanStartElement(): false
### setScannerState: SCANNER_STATE_CONTENT
### setScannerState: SCANNER_STATE_START_OF_MARKUP
>>> scanEndElement()
</ContraAccountNumber5>### setScannerState: SCANNER_STATE_CONTENT
### setScannerState: SCANNER_STATE_START_OF_MARKUP
>>> scanEndElement()
</OtherRecord2000>### setScannerState: SCANNER_STATE_CONTENT
### setScannerState: SCANNER_STATE_START_OF_MARKUP
>>> scanEndElement()
</Document>### setScannerState: SCANNER_STATE_CONTENT
### setScannerState: SCANNER_STATE_START_OF_MARKUP
>>> scanEndElement()
</File>### setScannerState: SCANNER_STATE_TRAILING_MISC
%%% setDispatcher: TrailingMiscDispatcher
### setScannerState: SCANNER_STATE_TERMINATED

Notice that scanStartElement reports that element <ContractAccountNumber2/>
has empty=false which is wrong. I am thinking maybe the number in the
element name is the cause of this error. The code in scanStartElement
certainly looks correct calling entityScanner.scanName() with empty being
set to true if "/" is detected immediately afterwards.
-- 
View this message in context: http://www.nabble.com/Debugging-invalid-character-event---Progress-tp15289604p15289604.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.


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