Edit

Share via


Word.Interfaces.XmlNodeLoadOptions interface

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents a single XML node applied to the document.

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

Properties

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

baseName

Gets the name of the element without any prefix.

firstChild

Gets the first child node if this is a parent node. Returns null if the node type is attribute.

hasChildNodes

Gets whether this XML node has child nodes. Always returns false for attribute nodes since they cannot have children.

lastChild

Gets the last child node if this is a parent node. Returns null if the node type is attribute.

level

Gets whether this XML element is part of a paragraph, is a paragraph, or is contained within a table cell or contains a table row. Returns null if the node type is attribute.

namespaceUri

Gets the Uniform Resource Identifier (URI) of the schema namespace for this XML node.

nextSibling

Gets the next element in the document that's at the same level as this XML node. Returns null if the node type is attribute.

nodeType

Gets the type of node.

nodeValue

Specifies the value of this XML node. For element nodes, represents the text content; for attribute nodes, represents the attribute value.

ownerDocument

Gets the parent document of this XML node.

parentNode

Gets the parent element of this XML node.

placeholderText

Specifies the text displayed for this element if it contains no text. Only applies to element nodes, not attribute nodes.

previousSibling

Gets the previous element in the document that's at the same level as this XML node. Returns null if the node type is attribute.

range

Gets the portion of a document that is contained in this XML node. Returns null if the node type is attribute.

text

Specifies the text contained within the XML element. Returns an empty string if the node type is attribute.

validationErrorText

Gets the description for a validation error on this XmlNode object. May not be meaningful for attribute nodes.

validationStatus

Gets whether this element is valid according to the attached schema. May not be meaningful for attribute nodes.

Property Details

$all

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

$all?: boolean;

Property Value

boolean

baseName

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the name of the element without any prefix.

baseName?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

firstChild

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the first child node if this is a parent node. Returns null if the node type is attribute.

firstChild?: Word.Interfaces.XmlNodeLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

hasChildNodes

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets whether this XML node has child nodes. Always returns false for attribute nodes since they cannot have children.

hasChildNodes?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

lastChild

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the last child node if this is a parent node. Returns null if the node type is attribute.

lastChild?: Word.Interfaces.XmlNodeLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

level

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets whether this XML element is part of a paragraph, is a paragraph, or is contained within a table cell or contains a table row. Returns null if the node type is attribute.

level?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

namespaceUri

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the Uniform Resource Identifier (URI) of the schema namespace for this XML node.

namespaceUri?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

nextSibling

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the next element in the document that's at the same level as this XML node. Returns null if the node type is attribute.

nextSibling?: Word.Interfaces.XmlNodeLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

nodeType

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the type of node.

nodeType?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

nodeValue

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Specifies the value of this XML node. For element nodes, represents the text content; for attribute nodes, represents the attribute value.

nodeValue?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

ownerDocument

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the parent document of this XML node.

ownerDocument?: Word.Interfaces.DocumentLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

parentNode

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the parent element of this XML node.

parentNode?: Word.Interfaces.XmlNodeLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

placeholderText

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Specifies the text displayed for this element if it contains no text. Only applies to element nodes, not attribute nodes.

placeholderText?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

previousSibling

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the previous element in the document that's at the same level as this XML node. Returns null if the node type is attribute.

previousSibling?: Word.Interfaces.XmlNodeLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

range

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the portion of a document that is contained in this XML node. Returns null if the node type is attribute.

range?: Word.Interfaces.RangeLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

text

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Specifies the text contained within the XML element. Returns an empty string if the node type is attribute.

text?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

validationErrorText

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the description for a validation error on this XmlNode object. May not be meaningful for attribute nodes.

validationErrorText?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

validationStatus

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets whether this element is valid according to the attached schema. May not be meaningful for attribute nodes.

validationStatus?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]