Yate
XmlText Class Reference

Xml Declaration. More...

#include <yatexml.h>

Inheritance diagram for XmlText:
XmlChild GenObject

Public Member Functions

 XmlText (const char *text)
 XmlText (const void *buf, unsigned int len)
 XmlText (const XmlText &orig)
virtual ~XmlText ()
const StringgetText () const
void setText (const char *text)
void setText (const void *buf, unsigned int len)
void toString (String &dump, bool escape=true, const String &indent=String::empty(), const String *auth=0, const XmlElement *parent=0) const
virtual XmlTextxmlText ()
bool onlySpaces ()
virtual void replaceParams (const NamedList &params)
Public Member Functions inherited from XmlChild
 XmlChild ()
virtual void setParent (XmlParent *parent)
virtual XmlElementxmlElement ()
virtual XmlCommentxmlComment ()
virtual XmlCDataxmlCData ()
virtual XmlDeclarationxmlDeclaration ()
virtual XmlDoctypexmlDoctype ()
Public Member Functions inherited from GenObject
 GenObject ()
virtual ~GenObject ()
virtual bool alive () const
virtual void destruct ()
virtual const StringtoString () const
virtual const StringtraceId () const
virtual void * getObject (const String &name) const
NamedCountergetObjCounter () const
NamedCountersetObjCounter (NamedCounter *counter)

Additional Inherited Members

Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
static bool getObjCounting ()
static void setObjCounting (bool enable)
static NamedCountergetObjCounter (const String &name, bool create=true)
static ObjListgetObjCounters ()

Detailed Description

Xml Declaration.

A Xml Declaration for Xml document

Constructor & Destructor Documentation

◆ XmlText() [1/3]

XmlText ( const char * text)

Constructor

Parameters
textThe text

Referenced by XmlText(), and xmlText().

◆ XmlText() [2/3]

XmlText ( const void * buf,
unsigned int len )

Constructor. Build a hexified text

Parameters
bufPointer to buffer to hexify
lenBuffer length

◆ XmlText() [3/3]

XmlText ( const XmlText & orig)

Copy constructor

Parameters
origOriginal XmlText

References XmlText().

◆ ~XmlText()

virtual ~XmlText ( )
virtual

Destructor

Member Function Documentation

◆ getText()

const String & getText ( ) const
inline
Returns
The text kept by this Xml Text

◆ onlySpaces()

bool onlySpaces ( )

Helper method to check if the text held by this XmlText contains only spaces

Returns
False if the text contains non space characters.

◆ replaceParams()

virtual void replaceParams ( const NamedList & params)
virtual

Replaces all ${paramname} in text with the corresponding parameters

Parameters
paramsList of parameters

Reimplemented from XmlChild.

◆ setText() [1/2]

void setText ( const char * text)
inline

Set the text

Parameters
textText to set in this XmlText

◆ setText() [2/2]

void setText ( const void * buf,
unsigned int len )
inline

Set hexified data value

Parameters
bufPointer to buffer to hexify
lenBuffer length

◆ toString()

void toString ( String & dump,
bool escape = true,
const String & indent = String::empty(),
const String * auth = 0,
const XmlElement * parent = 0 ) const

Build a String from this XmlText

Parameters
dumpThe string where to append representation
escapeTrue if the text need to be escaped
indentSpaces for output
authOptional list of tag and attribute names to be replaced with '***'. This parameter can be used when the result will be printed to output to avoid printing authentication data to output. The array must end with an empty string
parentOptional parent element whose tag will be searched in the auth list

References String::empty().

◆ xmlText()

virtual XmlText * xmlText ( )
inlinevirtual

Get the Xml text

Returns
This object

Reimplemented from XmlChild.

References XmlText().

Referenced by XmlFragment::getText().


The documentation for this class was generated from the following file: