DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18259>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18259 Serialize empty attribute couses NullPointerException Summary: Serialize empty attribute couses NullPointerException Product: XalanJ2 Version: 2.5Dx Platform: Other OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: org.apache.xalan.serialize AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] docXML: <?xml version="1.0" encoding="ISO-8859-2"?> <LS> <L alias="aaaaa"> <!-- here id attribute is empty --> <V id="">ssss</V> </L> <LS> Sample code: Element el = docXML.getDocumentElement(); Properties oprops = new Properties OutputProperties.getDefaultMethodProperties("xml")); oprops.put(OutputKeys.INDENT, "yes"); oprops.put(OutputKeys.ENCODING,"ISO-8859-2"); Serializer serializer = SerializerFactory.getSerializer(oprops); StringWriter stringOut = new StringWriter(); serializer.setWriter(stringOut); serializer.setOutputFormat(oprops); serializer.asDOMSerializer().serialize(el); ERROR: java.lang.NullPointerException void org.apache.xalan.serialize.SerializerToXML.writeAttrString (java.lang.String, java.lang.String) SerializerToXML.java:2227
