cancel
Showing results for 
Search instead for 
Did you mean: 

String to XML using XSLT

swatantra_vijay3
Participant
0 Kudos
664

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

View Entire Topic
jyothi_anagani
Active Contributor
0 Kudos

Hi swatantra,

I think Namespace is missing...Check the XSLT one more time..

Thanks.

swatantra_vijay3
Participant
0 Kudos

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

swatantra_vijay3
Participant
0 Kudos

Guys any ideas ???

Regards

Swatantra

Former Member
0 Kudos

Hi Vijay,

Have you tested your XSLT on an external tool? It can be a problem with your incoming data or with your mapping program.

Also, share the mapping so that anyone can help you out with that.

Regards,

Neetesh