BindXML "unexpected" error


#1

I'm using BindXml to generate a pdf file

[input xml]

xml version="1.0" encoding="utf-8" ?>

<Contents>

<Content>Hello WorldContent>

Contents>

[input xsl]

xml version="1.0" encoding="utf-8" ?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="text()" />

<xsl:template match="/Contents">

<Pdf xmlns="Aspose.Pdf">

<Section>

<Text ID="Text1">

<Segment><xsl:value-of select="Content"/>Segment>

Text>

Section>

Pdf>

xsl:template>

xsl:stylesheet>

and I'm getting this error

System.Xml.XmlException : The XML declaration is unexpected. Line 1, position 4.

Have you any ideea why?

Thanks

Nicu


#2

Thanks for considering Aspose.

This error may occur because of your wrong input xml. You should provide a xml file with correct syntax. Please go to Aspose.Pdf wiki for proper usage.

http://www.aspose.com/Wiki/default.aspx/Aspose.Pdf/HelloWorldXMLXSLT.html