cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [1/5] cxf git commit: [CXF-6240] add reporting of processing instructions to W3CDOMStreamReader
Date Thu, 23 Mar 2017 12:37:37 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 64070aa91 -> ee248ce7a


[CXF-6240] add reporting of processing instructions to W3CDOMStreamReader


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

Branch: refs/heads/master
Commit: ee248ce7a4a1b04bcbddbdcef82d695ccc140160
Parents: 9063184
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:31:07 2017 -0400

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/ee248ce7/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 49d8c01..728b391 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,11 +401,11 @@ 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 {


Mime
View raw message