on 09-13-2006 8:38 AM
I am creating a XI adapter to our system.
In the adapter I want to use XPath expression.
I use the classes from javax.xml.xpath.*
This way does not work in the XI application server. (Java 1.4.2)
What is the correct way? Which packages/classes must be used?
Miklos
Hi Miklos,
The package javax.xml.xpath was introduced with Java 5 (1.5), thus it is not available in XI which runs Java 1.4.2. There are (at least) a couple of ways to use XPath in Java 1.4:
1. Use a third-party library that supports XPath, for instance Xalan-J from Apache.
2. Embed your XPath expression in an XSLT transformation, execute the transformation using classes from the javax.xml.tranform... packages (which <i>are</i> part 1.4) and extract the result.
Cheers,
Thorsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. Does not work. The XI has following restriction: Only one XML parser exist in the adapter framework. If I change the parser for my adapter the change will affect all adapters.
I gues the class loader for the adapter framework must be implemented in an other way. Each adapter should have its own class loader.
2. This could be a way. Currently I implemented the customer requirement with the SAP SAX parser.
Miklos
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.