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 Richard Rowell <ri...@bowmansystems.com> on 2002/04/09 19:47:29 UTC

How to unserialize, xxxDV.getActualValue?

I'm still a bit of a novice to Xerces so please be gentle...

I'm trying unserialize an XML stream into Java objects through the SAX 
parser.  I'm looking for the correct way to get the data into the 
the Java types.  I noticed that the *DV classes have a "getActualValue" 
function, is that what I'm looking for?  If so, where do I get a 
"ValidationContext" for the second parameter?

The SAX Parser only allows me to access string data, for example a data will 
come in as a string.  I would like to get this date into a Java Date class or 
some other similar/compatible class.  I do not want to code the conversion 
routines to convert all of the different (date, float, etc) formats, and I'm 
pretty sure I don't need to.  Can someone give me a push in the right 
direction?  Links to documentation/FAQs welcome.

PS:  In my schema I use the "token" type quite a bit.  In my XML Schema book 
"Definitive XML Schema" on page 224 it states that "The token data type has a 
whiteSpace facet of collapse, which means that the processor replaces each 
carriage return, line feed, and tab by a single space.  After this 
replacement each group of consecutive spaces is collapsed into one space 
character, and all leading and trailing spaces are removed."

The xerces SAX parser doesn't seem to clean up token strings as the book 
suggests, can I enable this somewhere or do I have to roll my own?

TIA

PPS: My mail server is being flaky, apologies if this comes through twice

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