We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Extract Content (Child Nodes) of Paragraphs from Word DOCX Document using Java | Extract Tables

I have Paragraph with few text content and one table. I am trying to extract it using Aspose words Java.I am able to get the name of Paragraph in a word document . But the content below the Paragraph is returned as Run(Node Type). When I print the Run’ s text, I am getting the name of Paragraph. But I need the child nodes of Paragraph such the content and tables presented below the Paragraph.

Sample Paragraph content is shown below:-

3.1 Video Ouputs

Venue can be configured with different types of displays. These displays can be interactive touchscreens (HTSE) or just be used to display video sources (BDU, DEU, SRMEB, etc). If the display has a control interface (Ethernet, RS-232, Discrete, etc) listed than the display will be configured with all venue controls that are applicable to that type of display. If there is no control interface listed then the display will have no control through Venue except to change the video source

Table contents are posted below.

Reference Designator Interface
Galley HTSE HDAV 1 Ethernet 4;

HDAV 1 3G-SDI Out 8|
|BDU 2|HDAV 2 Ethernet 3;

HDAV 2 3G-SDI Out 1|
|BDU 3|HDAV 1 Ethernet 3;

HDAV 1 3G-SDI Out 1|

The document has table in every paragraph of the document. But when i try to read all the tables i get only the two tables exist before TOC content of the document.

NodeCollection tablesList = document.getChildNodes(NodeType.TABLE, true);
System.out.println(“Table count :” + tablesList.getCount());

I am getting table count as 2. But we have more than 15 tables and each table is placed below the paragraph.

So I tried to read Paragraph and i get only the Runs as a child and Tables and text is not coming.


The problem may simply be occurring because you are using Aspose.Words for Java API in evaluation mode (i.e. without applying a License). In case the problem still remains even after applying license, please ZIP and attach the following resources here for testing:

  • Your simplified input Word document
  • A screenshot highlighting the areas of Paragraph/Table you want to extract/read

We will then start investigation into your particular scenario and provide you more information.

Thank you. Yeah I was trying to use evaluation version to make sure it has all the apis we need.


If you want to test latest (20.9) version of Aspose.Words for Java without the evaluation version limitations, then you can also request a 30-day Temporary License. Please refer to How to get a Temporary License?