There are a number of things to try ... I would recommedn you try this one first
String xml = .... XmlObject obj = XmlObject.Factory.parse(xml); System.out.println(obj.dump()); Regards Don -----Original Message----- From: Arek Stryjski [mailto:[EMAIL PROTECTED] Sent: 18 July 2005 14:10 To: [email protected] Subject: Re: Parsing xml > > Any ideas? Many thanks. :-) Not, not really :( I can see you have very nice debugging system, but I will put parsing in try-catch: try { testDocument = TestDocument.Factory.parse( event.getMessage().toString() ); test = testDocument.getTest(); LOGGER.debug("The id is " + test.getTest1()); } catch(Throwable ex) { ex.printStackTrace(); } I know it is stupid, but maybe it will help to get any information what is happening... In my opinion you should get NullPointerException or some debugging massage after parsing. ---- I just placed some test code in main of one class to test it: String s = "<test test2=\"test 2\" test1=\"test 1\" xmlns=\"http://cpp.co.uk/test\"/>"; uk.co.cpp.test.TestDocument doc = uk.co.cpp.test.TestDocument.Factory.parse(s); System.out.println("=" + doc.xmlText()); System.out.println("=" + doc.getTest().getTest1()); System.out.println("=" + doc.getTest().getTes2()); I got: =<test test2="test 2" test1="test 1" xmlns="http://cpp.co.uk/test"/> =test 1 =null It is null in second method because I did misspelling in Schema but not in XML. Call xmlText() to test what you have in this parsed document. Arek --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

