Hi,
I have a problem, would be great if someone can help me out.
the XML looks as below...
< aaa.bbb >
<ID type="String"></ID>
< Element type="Boolean">true</Element>
So, the tag in the xml i need to parse, has "dots". am unable to unmarshall
them, i am using a mapping file , as below..Castor just fails to read this tag,
am not sure if i ve done the right way, kindly assist...
<mapping>
<class name = "class1">
<map-to xml="aaa.bbb"/>
Cheers
Vinodh
-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 10, 2006 12:26 PM
To: dev@castor.codehaus.org
Subject: RE: [castor-dev] XSD validation
Just forwarding this to the user mailöing list as well ...
Werner
________________________________
From: Vinodh Rajaraman (vrajaram) [mailto:[EMAIL PROTECTED]
Sent: Mittwoch, 10. Mai 2006 08:20
To: dev@castor.codehaus.org
Subject: [castor-dev] XSD validation
Hi,
I am using Castor Source generator for a XSD which has an entry as
follows:
<xs:element name="device_name" nillable = "false"
type="xs:string" />
I wanted to ensure that the the entry device_name is not
"empty", or not "white space characters". so i introduced this "nillable =
false" after googling. However the code for checking null is not generated by
Castor. So i added the code as below for validation? Will castor not generate
such checks? or am i doing sth wrong here?
Kindly help me out.
However, the code generated for validation, is as follows:
fieldValidator.setMinOccurs(1);
{ //-- local scope
StringValidator typeValidator = new StringValidator();
typeValidator.setWhiteSpace("preserve");
//added by me
typeValidator.setMinLength(1);
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
Cheers
Vinodh
-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the
following address:
[EMAIL PROTECTED]
-------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------