|
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

