cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [4/5] cxf git commit: [CXF-6240] add reporting of processing instructions to W3CDOMStreamReader
Date Thu, 23 Mar 2017 13:28:46 GMT
[CXF-6240] add reporting of processing instructions to W3CDOMStreamReader

# Conflicts:
#	core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/896f9890
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/896f9890
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/896f9890

Branch: refs/heads/3.1.x-fixes
Commit: 896f9890d996972b82afa819f0417876f5198c44
Parents: 67087e8
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed Mar 22 19:01:59 2017 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Thu Mar 23 08:41:47 2017 -0400

----------------------------------------------------------------------
 .../java/org/apache/cxf/staxutils/W3CDOMStreamReader.java | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/896f9890/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java b/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
index eb8442b..0836379 100644
--- a/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
+++ b/core/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
@@ -33,6 +33,7 @@ import org.w3c.dom.DocumentFragment;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
+import org.w3c.dom.ProcessingInstruction;
 import org.w3c.dom.Text;
 import org.w3c.dom.TypeInfo;
 
@@ -188,6 +189,8 @@ public class W3CDOMStreamReader extends AbstractDOMStreamReader<Node,
Node> {
             return CDATA;
         case Node.ENTITY_REFERENCE_NODE:
             return ENTITY_REFERENCE;
+        case Node.PROCESSING_INSTRUCTION_NODE:
+            return PROCESSING_INSTRUCTION;
         default:
             throw new IllegalStateException("Found type: " + content.getClass().getName());
         }
@@ -398,12 +401,13 @@ public class W3CDOMStreamReader extends AbstractDOMStreamReader<Node,
Node> {
     }
 
     public String getPITarget() {
-        throw new UnsupportedOperationException();
+        return ((ProcessingInstruction)content).getTarget();
     }
 
     public String getPIData() {
-        throw new UnsupportedOperationException();
-    }   
+        return ((ProcessingInstruction)content).getData();
+    }
+
     public Location getLocation() {
         try {
             Object o = getCurrentNode().getUserData("location");


Mime
View raw message