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:13:14 UTC

How to unserialize, *DV.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?

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 oft 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

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