Hi,
 
I would be obliged if someone could tell me, whats happening below. as such, i got intro'ed to Castor only a few days back, so kindly excuse my ignorance and help me out.
 
Am trying to use Source generator - windows XP, using castor-1.0M1-xml.jar. i didnt set any property file or castorbuilder file,etc..
 
the xsd file..simplest form..chosen, am getting Parser error, no matter what i try. kindly point out my mistakes..thanks a lot..

<?xml version="1.0"?>

<complexType name="A">

<sequence>

<element name="B" type="string"/>

<element name="C" type="string"/>

</sequence>

</complexType>

 

now in cmd prompt in Windows

C:\EnterInfo\Projects\Seeds\SeedFile\Code\vinod>java org.exolab.castor.builder.S

ourceGenerator -i example.xsd

org.xml.sax.SAXException: In document: 'file:///C:/EnterInfo/Projects/Seeds/Seed

File/Code/vinod/example.xsd'

Parsing Error : Element type "complexType" must be declared.

Line : 3

Column : 23

at org.exolab.castor.xml.schema.reader.Sax2ComponentReader.error(Sax2Com

ponentReader.java:281)

at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1186

)

at org.apache.xerces.validators.common.XMLValidator.reportRecoverableXML

Error(XMLValidator.java:1698)

at org.apache.xerces.validators.common.XMLValidator.validateElementAndAt

tributes(XMLValidator.java:3383)

at org.apache.xerces.validators.common.XMLValidator.callStartElement(XML

Validator.java:1155)

at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen

tScanner.java:1862)

at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp

atch(XMLDocumentScanner.java:1005)

at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS

canner.java:381)

at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)

at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera

tor.java:411)

at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenera

tor.java:466)

at org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:8

46)

C:\EnterInfo\Projects\Seeds\SeedFile\Code\vinod>

Reply via email to