Wade, you're right that there's a descrepency here.
Castor is throwing this error, not the parser.
> org.xml.sax.SAXException: Illegal Text data found as child of:
> EnvironmentalInterestStartDate
> value: "1967-08-13"{file: [not available]; line: 34;
> column: 79}
> org.xml.sax.SAXException: Illegal Text data found as child of:
> EnvironmentalInterestStartDate
It is coming from line 690 of UnmarshalHandler.
This error shows that castor is confused.
So, I don't this this issue has to do with date processing.
Castor for a yet-to-be-determined-reason thinks
that there's no text allowed for this node.
Is it possible that the *Descriptor.class files weren't compiled
and in the cp when you ran this?
In one of your other posts you had an error like this:
> java.lang.NullPointerException java.lang.NullPointerException
> at
> org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalH
> andler.jav
> a:1090)
> at
> org.apache.xerces.parsers.AbstractSAXParser.startElement(Unkno
> wn Source)
>
Are you using 'element' or 'type' code generation.
Juding by the
<cbf:binding xmlns:cbf="http://www.castor.org/SourceGenerator/Binding"
defaultBindingType='element'>
in one of your files, you're using 'element'. If you don't have a preference,
try using 'type'. Many more folks do it this way.
kirk out.
> -----Original Message-----
> From: Wade Chandler [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 13, 2003 1:44 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] Issue with XML names and
> dashes. Help needed.
>
>
> Hey Eric,
>
> The main problem I was having was I'm getting a
> Sax Exception that
> says invalid date format, but I can't figure out why
> Xerces would
> validate the file fine, but then would throw an exception when
> validating with the Sax parser? It may very well be
> Xerces and not
> Castor. I just thought that maybe the date error I was
> getting was
> caused by Castor. The xml file frs22_test_data.xml
> that is in the zip
> file of my last post was generated with XML Spy. That
> XML file is test
> data generated from the Schema. I am getting a parse
> error when I'm
> trying to unmarshal actually.
> But, that is what I can't figure out. I can
> validate with
> Xerces, but then I'm getting a Sax Exception on
> validation which says
> the Date is an invalid format. I thought maybe Castor
> is throwing a
> SaxException because of the date format for some
> reason. Maybe, XML Spy
> is outputting an incorrect date format. It is writing
> date's formatted
> like this year-month-day? Is this normal for the
> xsd:date format? Does
> anybody know if this is the problem? I assumed it
> would be correct, but
> will validate that notion at www.w3.org by looking at
> the xml schema
> primer. Any ideas are welcome. Thanks. I just can't
> take my data from
> XML spy that validates in XML spy and xerces. Do an
> unmarshal against
> it with the source generator generated classes, and
> then turn around and
> marshal the data to another file. That is all I am
> trying to do for
> testing my classes from source generator and they are
> not working.
> Thought I would test them before I wrote db queries to
> populate them.
>
> Thanks Eric, thanks in advance to anyone else,
>
> Wade Chandler
> Software Engineer
> Red-e Set Grow, LLC
> Winston Salem, NC
> Phone: 336-777-0075 ext. 105
> Email: [EMAIL PROTECTED]
>
> -----Original Message-----
> From: Ostermueller, Erik [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 13, 2003 1:46 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] Issue with XML names and
> dashes. Help needed.
>
>
> Wade wrote:
> > I'm trying
> > to figure out how to allow the date format to
> be different.
>
> You're using file generated from SourceGenerator, right?
> If so, you've got some coding to do to use a custom
> format. This will
> help get you started:
> http://www.brainopolis.com/castorwiki/Wiki.jsp?page=HowT
oChangeDateForma
tOutputtedTo.xmlFiles
I'd be happy to work on design ideas for this.
If you use introspection (generated value objects w/o *Descriptor.java
files), this might be helpful:
http://www.brainopolis.com/castorwiki/Wiki.jsp?page=DateParsing
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
DISCLAIMER:
This email message is for the sole use of the intended recipient(s) and may contain
confidential and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please contact the
sender by reply email and destroy all copies of the original message and attachments.
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev