on 2009 Aug 20 12:22 PM
Hi
I am trying to extract XML from XML string which is inside a XML tag
My message looks like this
<?xml version="1.0" encoding="UTF-8"?>
<ns0:InsertData xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">
<ns0:Data>
Here actual xml message resides
</ns0:Data>
I am using XSLT mapping as
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="Data">
<xsl:value-of select="." disable-output-escaping="yes"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
When Iu2019m trying to execute this mapping in Interface mapping test
I am getting below error
Problem when building the tree , XML not well formed
Any clues???
Regards
SV
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:for-each select="//ns0:Data">
<xsl:value-of select="." disable-output-escaping="yes"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
As Satish mentioned, it would be helpful if you provide a better sample input message and an example of the output you are expecting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijay,
It seems something wrong in your input. Can you exact input payload so that somebody can help you out with the xslt. If you are getting the same payload, I feel you can directly do a graphical mapping. I will let you know only when i see the exact payload.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi swatantra,
I think Namespace is missing...Check the XSLT one more time..
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jyothi ,
I tried with namespace as well , still the same problem persisting
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" omit-xml-declaration="yes" />
<xsl:template match="/">
<xsl:for-each select="//ns0:Data">
<xsl:value-of select="." disable-output-escaping="yes"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Any more ideas
Thanks
Edited by: Swatantra Vijay on Aug 20, 2009 1:36 PM
Edited by: Swatantra Vijay on Aug 20, 2009 1:38 PM
Please check if this blog helps
/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
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.