Return-Path: Delivered-To: apmail-xmlbeans-dev-archive@www.apache.org Received: (qmail 12612 invoked from network); 14 Mar 2007 21:22:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2007 21:22:28 -0000 Received: (qmail 22138 invoked by uid 500); 14 Mar 2007 20:55:57 -0000 Delivered-To: apmail-xmlbeans-dev-archive@xmlbeans.apache.org Received: (qmail 22115 invoked by uid 500); 14 Mar 2007 20:55:57 -0000 Mailing-List: contact dev-help@xmlbeans.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@xmlbeans.apache.org List-Id: Delivered-To: mailing list dev@xmlbeans.apache.org Received: (qmail 22103 invoked by uid 99); 14 Mar 2007 20:55:56 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 13:55:56 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of wpoon@bea.com designates 66.248.192.21 as permitted sender) Received: from [66.248.192.21] (HELO usremg01.bea.com) (66.248.192.21) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 13:55:46 -0700 Received: from usremr01.bea.com (mailrelay.bea.com [10.160.29.91]) by usremg01.bea.com (Switch-3.2.2/Switch-3.2.2) with ESMTP id l2EKtOt1001162 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Wed, 14 Mar 2007 13:55:25 -0700 Received: from repbex01.amer.bea.com (repbex01.bea.com [10.160.26.98]) by usremr01.bea.com (Switch-3.2.2/Switch-3.2.2) with ESMTP id l2EKtMBA020120 for ; Wed, 14 Mar 2007 12:55:23 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7667B.14FDE986" Subject: RE: org.apache.xmlbeans.XmlException: Element is not valid Date: Wed, 14 Mar 2007 13:55:22 -0700 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: org.apache.xmlbeans.XmlException: Element is not valid Thread-Index: AcdmcN0aGRlNQRj/RpOAQaoYUKIoCAACZjgQ References: From: "Wing Yew Poon" To: X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.2.21.161433 X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C7667B.14FDE986 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ramesh, assuming that "Template.xsd" is the xsd file for your schema, you are parsing the Template schema (thus a schema instance) rather than a Template instance, as Jacob suspected. What you want to do is to parse an xml instance of your schema, not the schema. For future reference, you should post user questions to the user list (user@xmlbeans.apache.org) rather than this list, which is for development-related matters. - Wing Yew ________________________________ From: Ramesh Ranganathan [mailto:ramesh.xb@gmail.com]=20 Sent: Wednesday, March 14, 2007 12:41 PM To: dev@xmlbeans.apache.org Subject: Re: org.apache.xmlbeans.XmlException: Element is not valid Hi Jacob, Thanks for the reply. I am new to xmlbeans. Please find the xsd I used. =20 =20 Comment describing your root element=20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 I generated the jar using scomp. =20 The code is like this =20 TemplateDocument poDoc =3D null; File xsdFile =3D new File("Template.xsd"); try { // Bind the incoming XML to an XMLBeans type. poDoc =3D TemplateDocument.Factory.parse (xsdFile); } catch (XmlException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } =20 Regards, Ramesh Kumar.R =20 On 3/14/07, Jacob Danner wrote:=20 Hi Ramesh, This looks like it might be an expected error. =09 My guess is that when you call: =09 TemplateDocument.Factory.parse() =09 you are passing content that starts with rather than