cancel
Showing results for 
Search instead for 
Did you mean: 

How to use XPath in the adapter framework

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

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

Former Member
0 Kudos

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

Answers (0)