I think the error message is pretty clear on this one. The 0th supplied input is not a schema document: its type is N=
The XmlBeans.compileXmlBeans method only takes schema elements and whatever you have passed in does not meet that criteria. You can read more about the method parameters at the following javadoc URL. http://xmlbeans.apache.org/docs/2.4.0/reference/org/apache/xmlbeans/XmlBeans.html#compileXmlBeans(java.lang.String,%20org.apache.xmlbeans.SchemaTypeSystem,%20org.apache.xmlbeans.XmlObject[],%20org.apache.xmlbeans.BindingConfig,%20org.apache.xmlbeans.SchemaTypeLoader,%20org.apache.xmlbeans.Filer,%20org.apache.xmlbeans.XmlOptions) ... The XmlObjects passed in should be w3c <schema> elements whose type is org.w3c.x2001.xmlSchema.Schema. (That is, schema elements in the XML namespace http://www.w3c.org/2001/XMLSchema.) Also org.w3c.x2001.xmlSchema.SchemaDocument is permitted. HTH, -jacobd On Sun, Mar 8, 2009 at 6:46 AM, ali...@gmx.net <ali...@gmx.net> wrote: > Hi, > I get the following error when trying to compile a XML Schema by passing a > org.w3c.dom.Element to the XmlBeans.compileXmlBeans() function: > > reson: Thread main: The 0th supplied input is not a schema document: its > type is N= > > The error is caused not by all Element (s) i pass to the function, only by > a subset, for example when I get the XSD from a file this way in Java: > > DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); > Document doc_input = factory.newDocumentBuilder().parse(new > File(xsd_input)); > Element the_element_to_pass = doc_input.getDocumentElement(); > > When I get the Element from another XML lib and pass it, it works... > > Any idea what's wrong with the Element I loaded from file and extracted > with getDocumentElement() ? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org > For additional commands, e-mail: user-h...@xmlbeans.apache.org > >