-
Type:
Bug
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.4
-
Fix Version/s: None
-
Component/s: Serialization/Deserialization
-
Labels:None
-
Environment:Vista, java 1.6
Trying to create a MessageElement from a DOM Document that contains a processing instruction results in a NullPointerException
Here's a trivial demonstration:
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db=dbf.newDocumentBuilder();
Document domDoc = db.parse(new InputSource(new StringReader("<rec><data>stuff</data><?boom?></rec>")));
Element el = domDoc.getDocumentElement();
new MessageElement(el);
The root problem is that MessageElement is only prepared to accept nodes of type CharacterData. I have enhanced MessageElement and NodeImpl to accept processing instructions.
I will submit the changes to the developers list