You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2010/04/22 12:11:21 UTC
[jira] Created: (CAMEL-2669) XPath - Add type converters from the
pesky XPath types to String, InputStream etc.
XPath - Add type converters from the pesky XPath types to String, InputStream etc.
----------------------------------------------------------------------------------
Key: CAMEL-2669
URL: https://issues.apache.org/activemq/browse/CAMEL-2669
Project: Apache Camel
Issue Type: Improvement
Components: camel-core
Affects Versions: 2.2.0, 2.1.0, 2.0.0
Reporter: Claus Ibsen
Priority: Minor
Fix For: 2.3.0
See nabble
http://old.nabble.com/XPath-Splitter-Problem-ts28325959.html
Then its easier for Camel end users as they wont have as many problems with the bad XPath result types for NODESET and whatnot.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-2669) XPath - Add type converters from the
pesky XPath types to String, InputStream etc.
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-2669.
--------------------------------
Resolution: Fixed
trunk: 943161.
Now the XML tags get outputted in the String as well.
> XPath - Add type converters from the pesky XPath types to String, InputStream etc.
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-2669
> URL: https://issues.apache.org/activemq/browse/CAMEL-2669
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.3.0
>
>
> See nabble
> http://old.nabble.com/XPath-Splitter-Problem-ts28325959.html
> Then its easier for Camel end users as they wont have as many problems with the bad XPath result types for NODESET and whatnot.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (CAMEL-2669) XPath - Add type converters from the
pesky XPath types to String, InputStream etc.
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reopened CAMEL-2669:
--------------------------------
Lets improve the XML converters in Camel. NodeList -> String is tricky but it should work as Gert suggest by including the tag names etc.
You can always use {{text()}} in the XPath expression if you only want the text content
> XPath - Add type converters from the pesky XPath types to String, InputStream etc.
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-2669
> URL: https://issues.apache.org/activemq/browse/CAMEL-2669
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.3.0
>
>
> See nabble
> http://old.nabble.com/XPath-Splitter-Problem-ts28325959.html
> Then its easier for Camel end users as they wont have as many problems with the bad XPath result types for NODESET and whatnot.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-2669) XPath - Add type converters from the
pesky XPath types to String, InputStream etc.
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-2669.
--------------------------------
Resolution: Fixed
trunk: 937260.
> XPath - Add type converters from the pesky XPath types to String, InputStream etc.
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-2669
> URL: https://issues.apache.org/activemq/browse/CAMEL-2669
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.3.0
>
>
> See nabble
> http://old.nabble.com/XPath-Splitter-Problem-ts28325959.html
> Then its easier for Camel end users as they wont have as many problems with the bad XPath result types for NODESET and whatnot.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2669) XPath - Add type converters from the
pesky XPath types to String, InputStream etc.
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59287#action_59287 ]
Claus Ibsen commented on CAMEL-2669:
------------------------------------
The files have been split to only contain the content
{code}
davsclaus:~/workspace/camel/camel-core/target/xpath$ ls
xpath-0.xml xpath-1.xml
davsclaus:~/workspace/camel/camel-core/target/xpath$ cat xpath-0.xml
Clausdavsclaus:~/workspace/camel/camel-core/target/xpath$ cat xpath-1.xml
Jonathandavsclaus:~/workspace/camel/camel-core/target/xpath$
{code}
> XPath - Add type converters from the pesky XPath types to String, InputStream etc.
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-2669
> URL: https://issues.apache.org/activemq/browse/CAMEL-2669
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.3.0
>
>
> See nabble
> http://old.nabble.com/XPath-Splitter-Problem-ts28325959.html
> Then its easier for Camel end users as they wont have as many problems with the bad XPath result types for NODESET and whatnot.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2669) XPath - Add type converters from the
pesky XPath types to String, InputStream etc.
Posted by "Gert Vanthienen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59279#action_59279 ]
Gert Vanthienen commented on CAMEL-2669:
----------------------------------------
When I look at the XPathToFileTest, I would have expected it to behave differently, outputting the XML element selected by the xpath expression instead of only the text node values.
{noformat}
Index: src/test/java/org/apache/camel/component/file/XPathToFileTest.java
===================================================================
--- src/test/java/org/apache/camel/component/file/XPathToFileTest.java (revision 942839)
+++ src/test/java/org/apache/camel/component/file/XPathToFileTest.java (working copy)
@@ -51,11 +51,11 @@
File first = new File("target/xpath/xpath-0.xml").getAbsoluteFile();
assertTrue("File xpath-0.xml should exists", first.exists());
- assertEquals("Claus", context.getTypeConverter().convertTo(String.class, first));
+ assertEquals("<person>Claus</person>", context.getTypeConverter().convertTo(String.class, first));
File second = new File("target/xpath/xpath-1.xml").getAbsoluteFile();
assertTrue("File xpath-1.xml should exists", second.exists());
- assertEquals("Jonathan", context.getTypeConverter().convertTo(String.class, second));
+ assertEquals("<person>Jonathan</person>", context.getTypeConverter().convertTo(String.class, second));
}
{noformat}
If you do a {{convertBodyTo(String.class)}} after the splitter but before sending the contents to a file, this is what happens, but the implicit conversion to InputStream that is being used in the file: endpoint seems to drop the {{<element/>}}s
> XPath - Add type converters from the pesky XPath types to String, InputStream etc.
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-2669
> URL: https://issues.apache.org/activemq/browse/CAMEL-2669
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.3.0
>
>
> See nabble
> http://old.nabble.com/XPath-Splitter-Problem-ts28325959.html
> Then its easier for Camel end users as they wont have as many problems with the bad XPath result types for NODESET and whatnot.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CAMEL-2669) XPath - Add type converters from the
pesky XPath types to String, InputStream etc.
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-2669:
----------------------------------
Assignee: Claus Ibsen
> XPath - Add type converters from the pesky XPath types to String, InputStream etc.
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-2669
> URL: https://issues.apache.org/activemq/browse/CAMEL-2669
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.0.0, 2.1.0, 2.2.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.3.0
>
>
> See nabble
> http://old.nabble.com/XPath-Splitter-Problem-ts28325959.html
> Then its easier for Camel end users as they wont have as many problems with the bad XPath result types for NODESET and whatnot.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.