CreateObjFromXml

Using this code as provided in your documentation for a Word XML file I get a Get Null Object from xml file.Make sure the xml file correct.

I can open the file in MS Word and it displays correctly.

FileStream fs = new FileStream("C:\\Test\\test1.xml",FileMode.Open);
Text text = Pdf.CreateObjFromXml(fs, null) as Text;
Aspose.Pdf.Section sec = pdf.Sections.Add();
sec.Paragraphs.Add(text);

Please note that if you want to cerate Text object, the root element in the xml should be . If it still won’t work, please provide the xml and let us check it.