on 12-06-2011 2:12 PM
I have worked with XSLT in the past, but never within Process Integration. I have the below xml and am attempting to grab the conversationId out of the xml for my mapping. But due to the namespace, ns0:, I am having trouble getting this value. In my prior work with XSLT, I never worked with namespaces. Any help would be greatly appreciated.
XML
<?xml version="1.0" encoding="UTF-8"?>
<ns0:processInboundMessage xmlns:ns0="http://integration.nexuse2e.org/BackendDeliveryInterface/">
<choreographyId/>
<businessPartnerId/>
<actionId/>
<conversationId>123456</conversationId>
<messageId/>
<payload>
</ns0:processInboundMessage>
value-of select
<xsl:value-of select="ns0:processInboundMessage/ns0:conversationId"/>
I've tried with the namespace, without, still can't retrieve the value. Unfortunately, I have to have the namespace in there.
Thanks!
Hi,
For this input XML
<?xml version="1.0" encoding="UTF-8"?>
<ns0:processInboundMessage xmlns:ns0="http://integration.nexuse2e.org/BackendDeliveryInterfaces">
<choreographyId/>
<businessPartnerId/>
<actionId/>
<conversationId>123456</conversationId>
<messageId/>
<payload/>
</ns0:processInboundMessage>
I wrote this XSLT code
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://integration.nexuse2e.org/BackendDeliveryInterfaces">
<xsl:template match="/">
<ns0:processInboundMessage>
<SrcFile><xsl:value-of select="ns0:processInboundMessage/conversationId"></xsl:value-of></SrcFile>
</ns0:processInboundMessage>
</xsl:template>
</xsl:stylesheet>
The output XML obtained is as shown below
<?xml version="1.0" encoding="UTF-8"?>
<ns0:processInboundMessage xmlns:ns0="http://integration.nexuse2e.org/BackendDeliveryInterfaces">
<SrcFile>123456</SrcFile>
</ns0:processInboundMessage>
Hope this solves your problem.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.