type

XNode

src @Js
abstract class XNode : Obj

XNode is the base class for XElem and XText.

fields

parent

Get the parent of this node or null if unmounted.

methods

doc

Get the root document node or null if this node is not mounted under a XDoc instance.

nodeType

Return the node type enum.

write

Write this node to the output stream.

writeToStr

Conveniece to write to an in-memory string.

Slot Details

doc

src XDoc? doc()

Get the root document node or null if this node is not mounted under a XDoc instance.

nodeType

src abstract XNodeType nodeType()

Return the node type enum. Note that XElem always returns elem, but that during pull parsing XParser will return elemStart and elemEnd.

parent

src XNode? parent { internal set }

Get the parent of this node or null if unmounted.

write

src abstract Void write(OutStream out)

Write this node to the output stream.

writeToStr

src Str writeToStr()

Conveniece to write to an in-memory string.