summaryrefslogtreecommitdiff
path: root/gnu/xml
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/xml')
-rw-r--r--gnu/xml/transform/SAXSerializer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/xml/transform/SAXSerializer.java b/gnu/xml/transform/SAXSerializer.java
index 2bd1f97ab..3ea423410 100644
--- a/gnu/xml/transform/SAXSerializer.java
+++ b/gnu/xml/transform/SAXSerializer.java
@@ -200,7 +200,8 @@ class SAXSerializer
public String getValue(String qName)
{
- return attrs.getNamedItem(qName).getNodeValue();
+ Attr attr = (Attr) attrs.getNamedItem(qName);
+ return (attr == null) ? null : attr.getNodeValue();
}
void serialize(Node node, ContentHandler ch, LexicalHandler lh)