public class NodeType
Example:
Document doc = new Document();
Paragraph paragraph = (Paragraph) doc.getChild(NodeType.PARAGRAPH, 0, true);
paragraph.appendChild(new Run(doc, "Hello world!"));
paragraph.appendChild(new Run(doc, " Hello again!"));
NodeCollection children = paragraph.getChildNodes();
// Paragraph may contain children of various types such as runs, shapes and so on
for (Node child : (Iterable<Node>) children)
if (((child.getNodeType()) == (NodeType.RUN))) {
Run run = (Run) child;
System.out.println(run.getText());
}
Field Summary | ||
---|---|---|
static final int | ANY | |
Indicates all node types. Allows to select all children.
|
||
static final int | DOCUMENT | |
static final int | SECTION | |
static final int | BODY | |
static final int | HEADER_FOOTER | |
A A |
||
static final int | TABLE | |
static final int | ROW | |
static final int | CELL | |
static final int | PARAGRAPH | |
A paragraph of text. A |
||
static final int | BOOKMARK_START | |
A beginning of a bookmark marker. |
||
static final int | BOOKMARK_END | |
An end of a bookmark marker. |
||
static final int | EDITABLE_RANGE_START | |
A beginning of an editable range. |
||
static final int | EDITABLE_RANGE_END | |
An end of an editable range. |
||
static final int | MOVE_FROM_RANGE_START | |
A beginning of an MoveFrom range. |
||
static final int | MOVE_FROM_RANGE_END | |
An end of an MoveFrom range. |
||
static final int | MOVE_TO_RANGE_START | |
A beginning of an MoveTo range. |
||
static final int | MOVE_TO_RANGE_END | |
An end of an MoveTo range. |
||
static final int | GROUP_SHAPE | |
A group of shapes, images, OLE objects or other group shapes. A |
||
static final int | SHAPE | |
static final int | COMMENT | |
static final int | FOOTNOTE | |
static final int | RUN | |
A run of text. |
||
static final int | FIELD_START | |
A special character that designates the start of a Word field. |
||
static final int | FIELD_SEPARATOR | |
A special character that separates the field code from the field result. |
||
static final int | FIELD_END | |
A special character that designates the end of a Word field. |
||
static final int | FORM_FIELD | |
A form field. |
||
static final int | SPECIAL_CHAR | |
A special character that is not one of the more specific special character types. |
||
static final int | SMART_TAG | |
A smart tag around one or more inline structures (runs, images, fields,etc.) within a paragraph |
||
static final int | STRUCTURED_DOCUMENT_TAG | |
Allows to define customer-specific information and its means of presentation. |
||
static final int | STRUCTURED_DOCUMENT_TAG_RANGE_START | |
A start of ranged structured document tag which accepts multi-sections content. |
||
static final int | STRUCTURED_DOCUMENT_TAG_RANGE_END | |
A end of ranged structured document tag which accepts multi-sections content. |
||
static final int | GLOSSARY_DOCUMENT | |
A glossary document within the main document. |
||
static final int | BUILDING_BLOCK | |
A building block within a glossary document (e.g. glossary document entry). |
||
static final int | COMMENT_RANGE_START | |
A marker node that represents the start of a commented range.
|
||
static final int | COMMENT_RANGE_END | |
A marker node that represents the end of a commented range.
|
||
static final int | OFFICE_MATH | |
An Office Math object. Can be equation, function, matrix or one of other mathematical objects. Can be a collection of mathematical object and also can contain some non-mathematical objects such as runs of text. |
||
static final int | SUB_DOCUMENT | |
A subdocument node which is a link to another document.
|
||
static final int | SYSTEM | |
Reserved for internal use by Aspose.Words.
|
||
static final int | NULL | |
Reserved for internal use by Aspose.Words.
|
public static final int ANY
public static final int DOCUMENT
public static final int SECTION
public static final int BODY
public static final int HEADER_FOOTER
A
A
public static final int TABLE
public static final int ROW
public static final int CELL
public static final int PARAGRAPH
A paragraph of text.
A
public static final int BOOKMARK_START
A beginning of a bookmark marker.
public static final int BOOKMARK_END
An end of a bookmark marker.
public static final int EDITABLE_RANGE_START
A beginning of an editable range.
public static final int EDITABLE_RANGE_END
An end of an editable range.
public static final int MOVE_FROM_RANGE_START
A beginning of an MoveFrom range.
public static final int MOVE_FROM_RANGE_END
An end of an MoveFrom range.
public static final int MOVE_TO_RANGE_START
A beginning of an MoveTo range.
public static final int MOVE_TO_RANGE_END
An end of an MoveTo range.
public static final int GROUP_SHAPE
A group of shapes, images, OLE objects or other group shapes.
A
public static final int SHAPE
public static final int COMMENT
public static final int FOOTNOTE
public static final int RUN
A run of text.
public static final int FIELD_START
A special character that designates the start of a Word field.
public static final int FIELD_SEPARATOR
A special character that separates the field code from the field result.
public static final int FIELD_END
A special character that designates the end of a Word field.
public static final int FORM_FIELD
A form field.
public static final int SPECIAL_CHAR
A special character that is not one of the more specific special character types.
public static final int SMART_TAG
A smart tag around one or more inline structures (runs, images, fields,etc.) within a paragraph
public static final int STRUCTURED_DOCUMENT_TAG
Allows to define customer-specific information and its means of presentation.
public static final int STRUCTURED_DOCUMENT_TAG_RANGE_START
A start of ranged structured document tag which accepts multi-sections content.
public static final int STRUCTURED_DOCUMENT_TAG_RANGE_END
A end of ranged structured document tag which accepts multi-sections content.
public static final int GLOSSARY_DOCUMENT
A glossary document within the main document.
public static final int BUILDING_BLOCK
A building block within a glossary document (e.g. glossary document entry).
public static final int COMMENT_RANGE_START
public static final int COMMENT_RANGE_END
public static final int OFFICE_MATH
An Office Math object. Can be equation, function, matrix or one of other mathematical objects. Can be a collection of mathematical object and also can contain some non-mathematical objects such as runs of text.
public static final int SUB_DOCUMENT
public static final int SYSTEM
public static final int NULL