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 "Farmer, Rod (Contractor)" <Ro...@dsto.defence.gov.au> on 2003/11/11 02:44:23 UTC

calling XMLreader and Xerces recursively doesn't procede li nearly

Hi,

I am currenlty writing a object serializing library for communication across java and c++, including typing.

I have a problem which seems rather incidious:

Inside my default handler, I see a tag that corresponds to a class, so I load that class and try and instantiate it.
However, it is possible that that class's constructor contains something of the form

Ship shipObject = ObjectReader.readObject("<Ships.BattleShip><blah>xxx</blah></Ships.BattleShip>");

which means that in order for  classClass.newInstance to return, a new XMLReader is created (In ObjectReader) and Xerces is called again.

I would have that that the my DefaultHandler would block waiting for this last call to return, but it doesn't. Here is some example output

Just saw <Ship.BattleCruiser>
Trying to get new class ... done
Trying to get new object
// Should output ... done (but subsequent readObject call never occurs
Just saw <Ship.Carrier>

I was wondering if the developers could shed some light on how Xerces-J handles calls to a new XMLReader etc...
 
Rod Farmer
 
========================================
Rod Farmer
Software Engineer
KESEM International
Rod.Farmer@kesem.com.au <ma...@kesem.com.au>,



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