Citations & Bibliography sources

Hi,


Is it possible to get all information about citation sources using Aspose.Words?
With Word Application we can do it by Source Manager (REFERENCES -> Manage Sources).
Hi Peter,

Thanks for your inquiry. Please use Document.GlossaryDocument property to get the glossary document within document or template. A glossary document is a storage for AutoText, AutoCorrect and Building Block entries defined in a document.

GlossaryDocument.GetBuildingBlock method finds a building block using the specified gallery, category and name. Microsoft Word organizes building blocks into galleries. The galleries are predefined using the BuildingBlockGallery enumeration e.g. Bibliography.

Could you please share your input document along with the value that you want to extract from the document? We will then provide you more information about your query.

Hi Tahir,


Unfortunately doc.getGlossaryDocument() returns null.
Please see the attached document.
Hi Peter,

Thanks for sharing the document. You can get the citation sources (Source Manager (References -> Manage Sources) by using Document.CustomXmlParts property. It is stored in customXml of document. Please use this property to get custom XML data storage parts.

The CustomXmlPart.Data property returns the XML content of this Custom XML Data Storage Part.

Please check the following code example. Hope this helps you.

Document doc = new Document(MyDir + "clen201400222_DS3.docx");
CustomXmlPart cxml = doc.getCustomXmlParts().get(0);

FileOutputStream fos = new FileOutputStream(MyDir + "customxml.xml");
fos.write(cxml.getData());
fos.close();

Hi Tahir,


It works! Thanks!
Hi Peter,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.