Thanks for your inquiry. A field
in a Word document is a complex structure consisting of multiple nodes that include field start, field code, field separator, field result and field end. Fields can be nested, contain rich content and span multiple paragraphs or sections in a document. The Field class is a “facade” object that provides properties and methods that allow to work with a field as a single object.
The Start, Separator and End properties point to the field start, separator and end nodes of the field respectively.
The content between the field start and separator is the field code. The content between the field separator and field end is the field result. The field code typically consists of one or more Run objects that specify instructions. The processing application is expected to execute the field code to calculate the field result.
You are using LOG.trace method before VisitorAction.SKIP_THIS_NODE that is the reason you are getting the log of Field Start node. Please use LOG.trace method at appropriate position in your code.
FieldChar.getField method return a field for the field char. Once you have filed object you can use Field.getEnd() method to gets the node that represents the field end. You can view the DOM structure of your documents by opening them with DocumentExplorer
Please see the following code snippet for your kind reference.
10.0pt;font-family:“Courier New”;color:#2B91AF;mso-no-proof:yes”>Document<span style=“font-size:10.0pt;font-family:“Courier New”;mso-no-proof:yes”> doc = new Document(MyDir
FieldStart fStart = (FieldStart)doc.getChild(NodeType.FIELD_START,
Field field =
FieldEnd fEnd = field.getEnd();