Hi,
Till now, I've found two different ways to use SchemaReader to get Schema object from local XSD file.
 
    1) SchemaReader reader = new SchemaReader(new BufferedReader(new FileReader(xsdFile)), null);
    2) SchemaReader reader = new SchemaReader(xsdFile);
 
With method 2),  I got problem when the input file or dir name contains utf-8 characters.
Method 1) is OK on this, however, somehow it changes the working directory to certain Castor working dir, thus causing problem if I have "include" statement in the XSD file and used relative dir to specify the target....(can not find the include XSD file). 
 
If possible I'd like to use method 2), as it's simple and effective.  Any suggestion on how to overcome the utf-8 character problem?
 
Thanks for the help,
Thomas

Reply via email to