Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.4
-
None
-
None
-
Vista, java 1.6
Description
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