cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member181985
Active Contributor
0 Kudos

if your generated data doesnt follow the target strucutre, that warning is obvious in IR framework.

Use SRC button to see the generated data.

Edited by: Praveen Gujjeti on Apr 12, 2010 5:46 PM

Former Member
0 Kudos

This is what my source data looks like when clicked on "Source Text View":

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_SourceString xmlns:ns0="http://kmd.dk/OpretRetIndberetninger/kmd">
   <Str><![CDATA[<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>
]]>

All this is what I put inside a string field "STR". Do I need to change something?

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi check your XSLT mapping in XMLY spy with test data,the out of the XSLT Mapping should be valid XML , then only you can see output in interface mapping.

Regards,

Raj