|
Inserts one or more markup objects or pcdata.
virtual markup& markup::operator <<(1st Variety
const markup& mkup
);
virtual markup& markup::operator<<( 2nd Variety
const std::string& pcdat
);
A markup
derived object, which can be one of the following, an element
, pcdata
, comment
, or procinstr
.
A string argument which represents PCDATA to insert as content.
Returns a reference to the markup object. This allows the chaining of the operation, which is most useful when inserting multiple markup objects.
Unlike the insert() operation, the second variety of this operation is relevant for all types derived from markup
,
including element
, pcdata
, comment
, and procinstr
. The first variety is revelant only for derived element
objects, however, since element
is the only type derived from markup
which and contain child markup objects.
The first variety above inserts markup objects into a derived element
object. The markup object(s) are inserted at the end of the
called element
. If you wish to insert markup objects anywhere before the end of the current markup children, use the markup::insert() operation. As mentioned above, this operation is only revelant for derived element
objects. When
called on other types derived from markup
, no action will be taken.
The first variety inserts a markup object at the end of the current children. This operation is equivalent to the push_back() operation.
The second variety, when called from a derived element
, inserts PCDATA into the called element. The passed PCDATA is enclosed
within a pcdata
object before being inserted into the called element, and is inserted at the end of any other markup objects which may be
present in the element
. When called on any other type derived from markup
, this operation appends the passed string text to
current text which already resides in the called pcdata
, comment
, or procinstr
object.
Logrithmic
For examples of all varieties of this operation, see element::operator <<(), pcdata::inserter_operator <<(), comment::operator <<(), and procinstr::operator <<().