|
Inserts a markup object into the root of the document.
markup::iterator document::insert(1st Variety
const markup& mkup
);
markup::iterator document::insert(2nd Variety
const markup::const_iterator& pos
const markup& mkup
);
markup::iterator document::insert(3rd Variety
const stylesheet& ss
);
A markup object to insert into the root of the document. The markup object can be a comment
, processing instruction
,
or doctype declaration
.
An iterator which specifies the position in the called document where the markup object will be inserted.
A stylesheet object to insert into the docuement as an embedded stylesheet.
Returns a markup iterator which points to the inserted element, if
the insertion was successful, or end()
if the insertion was
unsuccessful.
This operation is used to insert markup into the root of the document. The root of the document is the area outside of the html
element. Valid markup outside the html
element can include comments, processing instructions, and a doctype declaration. Any attempt
to insert an element other than html
in the root of the document will be unsuccessful. There is actually no need to insert the
html
element or doctype declaration in the document explicitly, since those markup objects are included automatically when constructing
a document with the root_doc
argument. This operation may be useful, however, to insert comments or processing instructions into the
root of the document if desired. To insert content into the body
of the element, call insert()
on
document::body()
.
The third variety may be especially useful, as it provides a convienient way to insert a stylesheet object into a document. The stylesheet will be
inserted into a style
element within the head
element of the document.
Logarithmic