Free Support Forum - aspose.com

Xmldocument

Received : 2007/10/03 12:05:23
Message : I am trying to used the xmldocument object to bind the pdf creation. But having issues passing the xml file name
I get the error :

Invalid XML document, The document does not have a root element.


heres the code so far, can you tell me how to proceed?
___________________________________________

Dim xmlDoc As New System.Xml.XmlDocument

Dim pdf1 As Pdf = New Pdf

Dim memStream As System.IO.MemoryStream = New System.IO.MemoryStream

memStream.Seek(0, SeekOrigin.Begin)

xmlDoc.Save("Daily_Stats.xml")

pdf1.BindXML(xmlDoc, Nothing)

pdf1.Save(Response.OutputStream)
pdf1.Close()


Thanks


This message was posted using Aspose.Live 2 Forum

Hi,

Thank you for considering Aspose.

Your code doesn't look fine. To use Pdf.BindXML method you should have an XML in Aspose.Pdf format. Or if it is standard XML then you must have an XSLT file. Can you please send us your XML file and let us check this issue.

Thanks.