ScroogeXHTML for Object Pascal 10.0-RC1
Loading...
Searching...
No Matches
TSimpleDomDocument Class Reference

document object which stores and builds the complete output More...

Inheritance diagram for TSimpleDomDocument:
ISimpleDomDocument

Public Member Functions

 TSimpleDomDocument ()
 Creates a new instance of the TSimpleDomDocument class.
 Add (const string S)
 Adds a string to the document.
 AddEncoded (const string S)
 Adds an encoded string to the document.
 AddPicture (const string PictureUrl, Cardinal WidthPx, Cardinal HeightPx, const TCharacterProperties CP)
 Adds a picture to the document.

Detailed Description

document object which stores and builds the complete output

A class which represents a document.

Constructor & Destructor Documentation

◆ TSimpleDomDocument()

TSimpleDomDocument::TSimpleDomDocument ( )

Creates a new instance of the TSimpleDomDocument class.

This constructor initializes a new instance of the TSimpleDomDocument class, and automatically adds an empty starting paragraph to the document.

Member Function Documentation

◆ Add()

TSimpleDomDocument::Add ( const string S)

Adds a string to the document.

This method appends the specified string to the current text node in the last paragraph of the document. If the current text node does not exist, a new one will be created automatically.

Parameters
SThe string to be added to the document.

◆ AddEncoded()

TSimpleDomDocument::AddEncoded ( const string S)

Adds an encoded string to the document.

This method appends an encoded version of the specified string to the current text node in the last paragraph of the document. It sets the text node as encoded before adding the string. A new text node is added before and after the encoded string to separate it from other content for better control over formatting.

Parameters
SThe string to be added in its encoded form.

Implements ISimpleDomDocument.

◆ AddPicture()

TSimpleDomDocument::AddPicture ( const string PictureUrl,
Cardinal WidthPx,
Cardinal HeightPx,
const TCharacterProperties CP )

Adds a picture to the document.

This method appends a picture node to the last paragraph of the document, carrying the character properties active at the point it was encountered, followed by a fresh text node.

Parameters
PictureUrlThe URL (or data URI) of the picture.
WidthPxThe rendered width of the picture, in pixels.
HeightPxThe rendered height of the picture, in pixels.
CPThe character properties active when the picture was encountered.

Implements ISimpleDomDocument.