Skip to Content
avatar image
Former Member

XPath in Java Mapping

Hello,

I'd like to ask you if and how it is possible to use XPath expressions in Java Mapping. There is a way with Xalan but SAP is using their own XML parser...

Many Thanks,

Milan

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Nov 13, 2007 at 08:17 PM

    In Java mapping, you have to explicitely parse the XML.

    If you want to use XALAN (for Java 1.4, pay attention to that), you can use the .jar in the mapping development and then include it as an imported archive in Integration Repository.

    Regards,

    Henrique.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Henrique Pinto

      Hi Henrique,

      actually I can: please check this out: http://www.exampledepot.com/egs/org.w3c.dom/xpath_GetAbsElem.html

      And it will be very easy for me to create needed xpath expression during mapping which I need. I also think about looking for elements by tag name somethink like this:

      NodeList list = doc.getElementsByTagName("TagName") limitation are that I cannot have the same name for incomming elements because then it will returm all of them and I will have to do more logic there.

      With XPath it will be more easy because you have more control where to look for element.