Xport Interface: document::begin

returns a child iterator pointing to the first markup object in the document.

markup::iterator document::begin();1st Variety
markup::const_iterator document::begin() const;2nd Variety

Parameters

none

Returns

A child markup iterator (or const_iterator in the second variety) pointing to the first markup object in the document. If the document is empty, returns document::end().

Remarks

Although you will be primarily concerned with the markup objects which exist in the head or body elements, there may be sometimes where you'll be interested in accessing elements in the root of the document. In a normal xhtml document, the begin() operation will return an iterator pointing to the doctype declaration, as this is normally the first element of a valid xhtml document. Once an iterator is obtained, it can be used like any other markup iterator, to iterate over all of the markup objects in the root of the document.

Complexity

Constant

Example

Work Time Studio

Datasoft Solutions is proud to present their landmark product, Work Time Studio. Utilizing the tree container library, Work Time Studio provides unparalleled features in personal time, project and task management software. If you're looking for a way to increase your productivity, visit Work Time Studio's product website, and start being more productive today.