Hi Arek, Thanks for your reply :-)
I've not set up a namespace, so the reference to the class is noNamespace.TestDocument. How do you set up a namespace? It never gets as far as accessing the data unfortunately, as it never gets past the unmarshalling bit. Caroline. -----Original Message----- From: Arek Stryjski [mailto:[EMAIL PROTECTED] Sent: 18 July 2005 12:17 To: [email protected] Subject: Re: Parsing xml > > There is a test schema, very basic, it just contains two fields test1 and > test2. > > There is a String of xml: > > --- > > <?xml version = "1.0" encoding = "UTF-8"?><Test > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:type="Test" test2="test 2" test1="test 1"></Test> > > --- > > I want to unmarshall this to the relevant xmlbean. > > However the code does not get past the above line, but no error is thrown. > > Any ideas what is going wrong? > I may be wrong but most probably your XML was not recognized by XMLBeans as TestDocument type. You are not declaring namspace in XML, and I think in XMLBeans you must do it in Schema and XML with same URL. If you can access your data with Cursor but not with getXxx() methods this is mostly the case. Did you try to parse somting more simple like: <test xmlns="http://www.company.com/your.namspace" test2="test 2" test1="test 1"/> I'm also not sure if it is right to use <Test> not <test>, but maybe it is? Hope it will help Arek --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This is an email from the CPP Group Plc, Holgate Park, York, YO26 4GA; telephone 01904 544500. This message may contain information that is confidential. If you are not the intended recipient, you may not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify the sender immediately by email, facsimile or telephone and either return or destroy the original message. The CPP Group Plc accepts no responsibility for any changes made to this message after it has been sent by the original author. This email has been scanned for all viruses by the MessageLabs Email Security System. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

