Skip to main content

xeElement

xeElement = 0

Example

function IsOrdinaryElement(Node: TXMLNode): Boolean;
begin
Result := (Node <> nil) and (Node.ElementType = xeElement);
end;

Usage

xeElement identifies an ordinary Velox XML element, the only node kind created by the Velox XML node factory methods.

Additional Technical Info

xeElement identifies an ordinary XML element. It is the default and most commonly visible NativeXML node kind, and the only kind created by Velox's NodeNew and NodeNewText factories. Other node kinds normally enter the model through parsing.

ElementCount and Elements include immediate children of this kind only. Raw sibling traversal and searches can also return attributes, comments, text, CDATA, processing instructions and DTD nodes, so test ElementType where element-only semantics matter.

Value behavior and important quirks

  • Reading an element's Value concatenates only its immediate xeCharData, xeWhiteSpace and xeCData children. It does not recursively include descendant-element text.
  • Text parsing right-trims each element text segment. NativeXML's default compact-whitespace mode can therefore make the value differ from a whitespace-preserving DOM.
  • Assigning Value is allowed only for a narrow simple-content shape. More than one character-data child, or any whitespace or CDATA child, causes the implementation to reject the assignment rather than silently replacing mixed content.
  • Generic Name assignment does not validate an XML name. Validate names and the serialized result when building XML dynamically.

Nodes returned by parsing, searching or factory calls are document-owned references. Do not keep them across document clear, reload or destruction.

External references

Created 2026-07-15