Documentation Language: Swift

Structure

XMLElement

A Swift wrapper around a libxml2 element node.

struct XMLElement

Topics

Classes

C
XMLElement.LevelIterator

Iterates across a single sibling chain without descending into children.

Operators

?
===(_:_:)

Returns true when two wrappers point to the same libxml2 node.

Instance Properties

V
attributes

The attributes declared directly on the element.

V
children

The immediate child elements of the element.

V
content

The concatenated textual content of the element subtree.

V
descendants

The descendant elements in depth-first pre-order.

V
name

The local name of the element.

V
namespace

The concatenated namespace prefixes declared for the element.

V
namespaces

The namespace declarations attached directly to the element.

V
parent

The immediate parent element.

V
qualifiedName

The namespace-qualified element name.

V
siblings

The following siblings of the element on the same level.

Instance Methods

F
attribute(named:)

Returns the string value of a named attribute.

F
attribute(named:namespace:)

Returns the string value of a namespace-qualified attribute.

F
bool(named:)

Returns a Boolean interpretation of a named attribute.

F
bool(named:namespace:)

Returns a Boolean interpretation of a namespace-qualified attribute.

F
levelIterator()

Returns an iterator across the current level only.

Default Implementations

Relationships

Conforms To

See Also

Traversing Trees

S
XMLTree

Enumerates a document tree while preserving node depth and parentage.

S
XMLAttribute

A Swift wrapper around a libxml2 attribute node.

S
XMLNameSpace

A Swift wrapper around a libxml2 namespace definition.