From c77c24b62dda44f897b980f2eebc4f55adf21d68 Mon Sep 17 00:00:00 2001 From: Aleksei Efimov Date: Thu, 31 Jul 2014 11:34:34 +0400 Subject: [PATCH] 8032908: getTextContent doesn't return string in JAXP Reviewed-by: joehw --- .../org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java b/jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java index 526f5e1b5f0..ea0e9b7a9a4 100644 --- a/jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java +++ b/jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java @@ -3145,7 +3145,11 @@ public class SAX2DTM2 extends SAX2DTM m_data.elementAt(-dataIndex+1)); } } - else if (DTM.ELEMENT_NODE == type || DTM.DOCUMENT_FRAGMENT_NODE == type + else if (DTM.ELEMENT_NODE == type) + { + return getStringValueX(nodeHandle); + } + else if (DTM.DOCUMENT_FRAGMENT_NODE == type || DTM.DOCUMENT_NODE == type) { return null;