I've tried the example on this post:
https://community.talend.com/t5/Installing-and-Upgrading/Use-tFileInputXML-for-reading-process-lt-jo... on version 2.21/Java but i get this error:
Exception in component tFileInputXML_1
org.dom4j.InvalidXPathException: Invalid XPath expression: ns:. Unexpected '.'
at org.dom4j.xpath.DefaultXPath.parse(DefaultXPath.java:360)
at org.dom4j.xpath.DefaultXPath.<init>(DefaultXPath.java:59)
at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:230)
at org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:207)
at testprojects.testxml.TestXML.tFileInputXML_1Process(TestXML.java:217)
at testprojects.testxml.TestXML.runJob(TestXML.java:444)
at testprojects.testxml.TestXML.main(TestXML.java:390)
Whats the way to get the value from this tag? <street district="Manhattan">Madison avenue</street> (eg. The xpath to get Madison avenue)
See the screenshot for more information.
I reproduced your job and it run fine with TOS2.3.0M1. Please see the screenshots.
Thats strange. I tried it both at home and at work. I'll try it with the 2.3.0 version but i doubt if thats it. It should work with older versions also. Could it be the Java version?
I'm running:
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode)