Skip to Content
0
Former Member
Apr 12, 2010 at 11:53 AM

"XML not well-formed" error while testing Interface mapping.

46 Views

Hello Experts,

I have a simple Interface mapping test, where a single input field of type string is mapped to a target Interface.

The content of a string actually will be a XML. I am using a XSLT mapping to convert string XML to XML. The XSLT mapping used by me is as :

<?xml version="1.0" encoding="ISO-8859-1" ?> 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output omit-xml-declaration="yes" /> 
 <xsl:template match="@*|node()">
 <xsl:copy>
  <xsl:apply-templates select="@*|node()" /> 
  </xsl:copy>
  </xsl:template>
<xsl:template match="/">
  <xsl:value-of select="//string" disable-output-escaping="yes" /> 
  </xsl:template>
  </xsl:stylesheet>

Test data to be used is :

<?xml version="1.0" encoding="ISO-8859-1"?>
<string>
<catalog>
	<cd>
		<title>Empire Burlesque</title>
		<artist>Bob Dylan</artist>
		<country>USA</country>
		<company>Columbia</company>
		<price>10.90</price>
		<year>1985</year>
	</cd>
	
	<cd>
		<title>Unchain my heart</title>
		<artist>Joe Cocker</artist>
		<country>USA</country>
		<company>EMI</company>
		<price>8.20</price>
		<year>1987</year>
	</cd>
</catalog>

</string>

My Target structure is like:

catalog
  CD
    title
    artist
    country
    company
    price
    year

No matter what I input as a test data , I get the error as "XML not well-formed" while testing Interface mapping.

Please suggest what could be the reason for this error?

Regards,

Abhi.