Sign In  Sign Up Live-Chat

Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

Last post 01-06-2008, 7:40 PM by AdeelTaseer. 13 replies.
Sort Posts: Previous Next
  •  12-05-2007, 8:34 AM 105273

    Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Hi,
      I am trying to use this static method of Pdf

    public static object CreateObjFromXml(
       string xmlFile,
       string xslFile
    );

    The file content looks like:
    <Section>
        <Text>
            <Segment>hello</Segment>
        </Text>
    </Section>

    The C# code is:

    Section LoNewSection = (Section) Pdf.CreateObjFromXml ("Section.xml", null);

    I get a NullReferenceException. Any idea what could be wrong?
    If I remove the
    <Segment> tag, then it seems to be working fine. Am i missing something?

    On the other hand, If I wrap the same file above inside the <Pdf> tag and call the BindXML method, it works fine.

    Thanks in advance,
    Venkat.
     
  •  12-05-2007, 9:22 AM 105288 in reply to 105273

    Re: Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Hi,

    I have tested this and was able to reproduce the error. I have logged this as PDFNET-4137 in our issue tracking system. We will try our best to resolve this issue as soon as possible.

    Thanks.

     
  •  12-05-2007, 11:03 AM 105333 in reply to 105288

    Re: Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Hi,
     Thanks for the quick response. Can you please let me know the approximate time when I can expect the fix? In a few hours or couple of days????

    Thanks,
    Venkat
     
  •  12-05-2007, 12:22 PM 105345 in reply to 105333

    Re: Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Hi,

    I will ask the developer working on this issue to give you an ETA.

    Thanks.

     
  •  12-06-2007, 1:43 PM 105514 in reply to 105333

    Re: Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Hi Venkat,

    We will give you a solution before next monday.

    Best regards.

    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  12-11-2007, 10:37 AM 105888 in reply to 105333

    Re: Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Attachment: Present (inaccessible)
    Hi Venkat,

    The bug has been fixed. Please try the attachment.

    Best regards.

    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  12-11-2007, 2:02 PM 105909 in reply to 105888

    Re: Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Hi Hans,
      Thanks for the fix. It seems to be working fine. But a small different issue: if there's a XML declaration at the top of the file like  this,

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

    it fails. Whereas BindXML handles this fine.

    Regards,
    Venkat.
     
  •  12-12-2007, 2:08 AM 105948 in reply to 105909

    Re: Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Hi Venkat,

    I am working on it now. I will give you a solution ASAP.

    Best regards.

    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  12-20-2007, 8:39 AM 106846 in reply to 105948

    Re: Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Attachment: Present (inaccessible)
    Hi,

    The bug has been resolved. Please try the attachment before our new hotfix.

    Best regards.

    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  12-21-2007, 9:31 AM 106985 in reply to 106846

    Re: Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Hi,
      Thanks for the fix. It seems to be working fine now.

    Regards,
    Venkat.
     
  •  01-02-2008, 9:56 AM 107495 in reply to 106846

    Re: Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Hi,
       Can you give me a version compiled in .Net 2.0 for this fix? I am facing problems in customising an installation script with 1.1 assemblies. See http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2381267&SiteID=1
     
  •  01-02-2008, 10:18 AM 107498 in reply to 107495

    Re: Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Attachment: Present (inaccessible)
    Hi,

    The version compiled in .net 2.0 is attached. Please try it.

    Best regards.

    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  01-03-2008, 7:11 AM 107608 in reply to 107498

    Re: Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Attachment: Present (inaccessible)
    Hi,
      Thanks for the 2.0 version. Unfortunately that also did not work. Let me try to explain what am I doing. To use Aspose.PDF in our environment (in all test & production systems), I am trying to create a customized installer (using MSI file) that installs only the Aspose.Pdf.dll (in GAC) and the license file and also registers the assembly for use from COM. I created a Visual Studio 2005 Setup & Deployment project and added the requird files. See attachment: AsposeSetup.zip

       Initially, the installer is ok - it installs the files and registers fine. But the problem is during uninstallation. When I uninstall using the SAME setup file, there are no error messages but the Aspose.Pdf.dll file is still present in GAC (but removed from the Application folder). If i manually remove the dll using gacutil.exe, then it works fine.

      We have already done such a customized setup project for Aspose.Words and the uninstallation goes on fine there. The difference that I could observe  is that while ALL the references of Aspose.Words is managed dll, Aspose.Pdf.dll has references to some Win32 dlls, probably for interops. Is that the reason that it could not be automatically deleted from GAC?   Or is this a bug in Microsoft Windows installer ?

    Regards,
    Venkat
     
  •  01-06-2008, 7:40 PM 107861 in reply to 107608

    Re: Pdf.CreateObjFromXml method throws NullReferenceException even for a simple XML file

    Hi,

    I don't think it has anything to do with Aspose.Pdf. It is a problem from Microsoft. Please check the last reply at this URL:

    http://www.thescripts.com/forum/thread102239.html 

    Thanks.

     
View as RSS news feed in XML