ANNA Suite  2020b
Multipurpose development suite for Telco applications
Public Member Functions | Protected Attributes | List of all members
anna::xml::DocumentFile Class Reference

#include <DocumentFile.hpp>

Inheritance diagram for anna::xml::DocumentFile:
Inheritance graph
[legend]
Collaboration diagram for anna::xml::DocumentFile:
Collaboration graph
[legend]

Public Member Functions

 DocumentFile ()
 
const NodegetRootNode () const
 
const anna::DataBlockgetContent () const noexcept(false)
 
const Nodeparse () noexcept(false)
 
const Nodeparse (const DTD &dtd) noexcept(false)
 
std::string asXmlString () const
 
- Public Member Functions inherited from anna::xml::Document
virtual ~Document ()
 
void initialize (const char *content) noexcept(false)
 
void initialize (const DataBlock &content) noexcept(false)
 
const char * getEncoding () const
 
const char * getVersion () const
 
const char * getContentAsCString () const noexcept(false)
 
void setEncoding (const char *encoding)
 
void setVersion (const char *version)
 
const xml::Nodeparse () noexcept(false)
 
const xml::Nodeparse (const DTD &dtd) noexcept(false)
 

Protected Attributes

std::string a_filename
 

Additional Inherited Members

- Protected Member Functions inherited from anna::xml::Document
 Document ()
 
void clear ()
 
void setContent (const char *content)
 
void setContent (const char *content, const int size)
 
void setContent (const DataBlock &content)
 

Detailed Description

Clase para gestionar un documento XML contenido en un archivo.

Constructor & Destructor Documentation

◆ DocumentFile()

anna::xml::DocumentFile::DocumentFile ( )
inline

Constructor.

28 : a_filename("<none>"), a_rootNode(NULL) {;}
std::string a_filename
Definition: DocumentFile.hpp:70

Member Function Documentation

◆ asXmlString()

std::string anna::xml::DocumentFile::asXmlString ( ) const
inline

XML representation from loaded document

Returns
XML string
Warning
Need previous initialization and parsing
63 { Compiler c; return (c.apply(a_rootNode)); }
xml::Compiler Compiler
Definition: Compiler.hpp:21
Here is the call graph for this function:

◆ getContent()

const anna::DataBlock& anna::xml::DocumentFile::getContent ( ) const
virtualnoexcept

Devuelve el contenido asociado al documento XML.

Returns
El contenido asociado al documento XML.

Reimplemented from anna::xml::Document.

◆ getRootNode()

const Node* anna::xml::DocumentFile::getRootNode ( ) const
inline

Root node after parsing, or NULL if not analyzed by mean parse()

Returns
XML document root node
35 { return a_rootNode; }
Here is the call graph for this function:

◆ parse() [1/2]

const Node* anna::xml::DocumentFile::parse ( )
inlinenoexcept

Parse xml document and return root node

Returns
Root node
Warning
Need previous initialization
48 { return (a_rootNode = Document::parse()); }
const xml::Node * parse() noexcept(false)
Here is the call graph for this function:

◆ parse() [2/2]

const Node* anna::xml::DocumentFile::parse ( const DTD dtd)
inlinenoexcept

Parse xml document with dtd and return root node

Parameters
dtdValidation DTD for XML document
Returns
Root node
Warning
Need previous initialization
56 { return (a_rootNode = Document::parse(dtd)); }
const xml::Node * parse() noexcept(false)
Here is the call graph for this function:

Member Data Documentation

◆ a_filename

std::string anna::xml::DocumentFile::a_filename
protected

Nombre del fichero indicado como parametro al invocar a Document::initialize


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