|
additional information: xmlbeans version: 1.0.4 java version: 1.4.2_03 The problem occurs when trying to retrieve any specific value from the XML. Adrian Shum wrote: it looks to me that, in the raw xml, you didn't have the "id" element in "message"-----Original Message----- From: Peter-Paul Rang [mailto:[EMAIL PROTECTED]] Sent: Monday, June 27, 2005 4:39 PM To: [email protected] Cc: rang >> Peter-Paul Rang Subject: NullPointerException when reading the leaves of the XML data I'm getting a NullPointerException when reading the leaves of the XML data I can read the XML File correctly, I can walk through the XML structure correctly, I can print it correctly. String file = "D:/Htb/Dev/message/EE07_xmlbean.xml"; File inputFile = new File(file); try { MCCIMT000100HT02Message message = MCCIMT000100HT02Message.Factory.parse(inputFile); System.out.println(message.xmlText()); However, when I want to retrieve specific values from the xml file, I get a NullPointerException. String extension = (String)message.getId().getExtension(); --> java.lang.NullPointerException at parser.TestMyXMLBean.doAll(TestMyXMLBean.java:42) at parser.TestMyXMLBean.main(TestMyXMLBean.java:82) Process exited with exit code 0. Any hints and tips are very much appreciated. Thanks, Peter-Paul --
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- NullPointerException when reading the leaves of the X... Peter-Paul Rang
- RE: NullPointerException when reading the leaves... Adrian Shum
- Re: NullPointerException when reading the le... Peter-Paul Rang
- RE: NullPointerException when reading the le... Peter-Paul Rang
- RE: NullPointerException when reading the leaves... Radu Preotiuc-Pietro
- Re: NullPointerException when reading the le... Peter-Paul Rang
- Re: NullPointerException when reading th... Dave Harrison
- Re: NullPointerException when readin... Dave Harrison
- Re: NullPointerException when r... Peter-Paul Rang
- How to parse the XML file with the corre... Peter-Paul Rang

