Been doing a little bit more digging and think that I can draw the folowing
conclusions;

The markup within the numbering.xml describes the various
numbering/nulleting 'formats' that are used within the document.
Each numbering format can be divided into one or more levels and so far, I
have not found a simple, single level pattern which does not, of course,
mean that they do not exist.
I think that the contents of numbering.xml are parsed by the xmlbeans layer
into an instance of the CTNumbering class and this instance is encapsulated,
in turn, within the XWPFNumbering class instance that it is possible to get
from the document.
I think that each numbering/bulleting format is represented by an instance
of the CTNum class and that an instance of this is encapsulated within the
XWPFNum class.
Neither XWPFNumbering nor XWPFNum currently expose all of the information
you require and it is going to be necessary, as a result, to modify the api.
Furthermore, I think it may be necessary to create a few new classes and
also modify the XWPFParagraph class. As an example, I have found out how to
get at the level information from the paragraph;

numberingLevel =
para.getCTP().getPPr().getNumPr().getIlvl().getVal().intValue();

This allows you to get at the level within the numbering format used to
define the number for a specific paragraph in a list.

I need to fire up the decompiler and take a good dig around within the
xmlbeans layer to see if the CTNumbering and CTNum classes do expose all the
information needed. If they do, it should be possible to add the required
support to the XWPFNumbering and XWPFNum classes and make it possible to
parse numbered/bulleted lists. The final worrying wrinkle to all of this is
how to derive the next number in a list. All the information in
numbering.xml offers is a prescription so to speak and we need to work out
how to decipher that.

Yours

Mark B



--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/XWPF-Parsing-or-creating-bullet-points-numbered-lists-with-POI-3-8-tp5710800p5710830.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to