You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2007/11/15 12:54:32 UTC
svn commit: r595276 -
/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/DomConverter.java
Author: jstrachan
Date: Thu Nov 15 03:54:23 2007
New Revision: 595276
URL: http://svn.apache.org/viewvc?rev=595276&view=rev
Log:
fix up the toString converter for NodeList so that attribute values can be returned too
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/DomConverter.java
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/DomConverter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/DomConverter.java?rev=595276&r1=595275&r2=595276&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/DomConverter.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/DomConverter.java Thu Nov 15 03:54:23 2007
@@ -20,7 +20,7 @@
import org.apache.camel.Converter;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.w3c.dom.Node;
+import org.w3c.dom.*;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
@@ -58,6 +58,11 @@
if (node instanceof Text) {
Text text = (Text) node;
buffer.append(text.getTextContent());
+ }
+ else if (node instanceof Attr) {
+ Attr attribute = (Attr) node;
+ buffer.append(attribute.getTextContent());
+
}
else if (node instanceof Element) {
Element element = (Element) node;