Returns a pointer to the title element, if present.
markup* document::title();1st Variety
const markup* document::title() const;2nd Variety
Parameters
none
Returns
A pointer to the title element, if present. If the title element isn't present, returns NULL.
Remarks
This operation allows a very convienient way to access the title element in the document, and to set the title of the document. This function can also be called to check or verify that the
title element exists.
Complexity
Constant
Example
#include "xhtml_doc.h"
#include "xport_brochure.h"
#include <iostream>
int main(int argc, char* argv[])
{
using namespace Xport;
// create an xhtml strict root document
document doc(root_doc);
stylesheet ss;
// populate document
std::cout << "Creating Xport Brochure.\n";
xport_brochure broch;
broch.create(doc, ss);
// output title of document
std::cout << "The title of the Xport Brochure document is '";
if (doc.title() && !doc.title()->empty()) {
formatter fmtr(std::cout);
doc.title()->front().write(fmtr);
std::cout << "'\n\n";
}
return 0;
}
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.