ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1671057 - /webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/XMLUtils.java
Date Fri, 03 Apr 2015 12:52:11 GMT
Author: coheigea
Date: Fri Apr  3 12:52:11 2015
New Revision: 1671057

URL: http://svn.apache.org/r1671057
Log:
Look for text content in CData sections as well

Modified:
    webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/XMLUtils.java

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/XMLUtils.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/XMLUtils.java?rev=1671057&r1=1671056&r2=1671057&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/XMLUtils.java
(original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/XMLUtils.java
Fri Apr  3 12:52:11 2015
@@ -35,6 +35,7 @@ import javax.xml.transform.stream.Stream
 import javax.xml.transform.stream.StreamSource;
 
 import org.w3c.dom.Attr;
+import org.w3c.dom.CDATASection;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
@@ -93,6 +94,9 @@ public final class XMLUtils {
                 if (Node.TEXT_NODE == node.getNodeType()) {
                     found = true;
                     builder.append(((Text)node).getData());
+                } else if (Node.CDATA_SECTION_NODE == node.getNodeType()) {
+                    found = true;
+                    builder.append(((CDATASection)node).getData());
                 }
                 node = node.getNextSibling();
             }



Mime
View raw message