Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::IXmlDocumentHolder Class Referenceabstract

Manager of a DOM document. More...

#include <arcane/core/IXmlDocumentHolder.h>

Inheritance diagram for Arcane::IXmlDocumentHolder:
Collaboration diagram for Arcane::IXmlDocumentHolder:

Public Member Functions

virtual ~IXmlDocumentHolder ()
 Releases resources.
virtual XmlNode documentNode ()=0
 Document node. This node is null if the document does not exist.
virtual IXmlDocumentHolderclone ()=0
 Clones this document.
virtual void save (ByteArray &bytes)=0
 Saves this document into the array bytes.
virtual String save ()=0
 Saves this document and returns the string.

Static Public Member Functions

static IXmlDocumentHoldercreateNull ()
 Creates and returns a null document.
static IXmlDocumentHolderloadFromBuffer (Span< const Byte > buffer, const String &name, ITraceMng *tm)
 Loads an XML document.
static IXmlDocumentHolderloadFromBuffer (ByteConstSpan buffer, const String &name, ITraceMng *tm)
 Loads an XML document.
static IXmlDocumentHolderloadFromFile (const String &filename, ITraceMng *tm)
 Loads an XML document.
static IXmlDocumentHolderloadFromFile (const String &filename, const String &schema_filename, ITraceMng *tm)
 Loads an XML document.

Detailed Description

Manager of a DOM document.

This class encapsulates the document node of a DOM tree. The destructor of this class releases the DOM tree. The user must be careful not to use a node from this tree after its release.

Definition at line 42 of file IXmlDocumentHolder.h.

Constructor & Destructor Documentation

◆ ~IXmlDocumentHolder()

virtual Arcane::IXmlDocumentHolder::~IXmlDocumentHolder ( )
inlinevirtual

Releases resources.

Definition at line 47 of file IXmlDocumentHolder.h.

Member Function Documentation

◆ clone()

virtual IXmlDocumentHolder * Arcane::IXmlDocumentHolder::clone ( )
pure virtual

◆ createNull()

IXmlDocumentHolder * Arcane::IXmlDocumentHolder::createNull ( )
static

Creates and returns a null document.

Definition at line 44 of file NullXmlDocumentHolder.cc.

◆ documentNode()

virtual XmlNode Arcane::IXmlDocumentHolder::documentNode ( )
pure virtual

Document node. This node is null if the document does not exist.

Implemented in Arcane::dom::XmlDocumentHolderLibXml2, Arcane::NullXmlDocumentHolder, and Arcane::XmlDocumentHolderLibXml2.

Referenced by Arcane::Application::_openUserConfig(), Arcane::CaseOptions::CaseOptions(), and Arcane::IOMng::writeXmlFile().

Here is the caller graph for this function:

◆ loadFromBuffer() [1/2]

IXmlDocumentHolder * Arcane::IXmlDocumentHolder::loadFromBuffer ( ByteConstSpan buffer,
const String & name,
ITraceMng * tm )
static

Loads an XML document.

Reads and parses the XML document named name whose data is in buffer.

The returned instance is never null. The caller owns the returned instance and must destroy it using the delete operator.

Definition at line 432 of file DomUtils.cc.

References Arcane::dom::DOMImplementation::_load().

Here is the call graph for this function:

◆ loadFromBuffer() [2/2]

IXmlDocumentHolder * Arcane::IXmlDocumentHolder::loadFromBuffer ( Span< const Byte > buffer,
const String & name,
ITraceMng * tm )
static

Loads an XML document.

Reads and parses the XML document named name whose data is in buffer.

The returned instance is never null. The caller owns the returned instance and must destroy it using the delete operator.

Definition at line 424 of file DomUtils.cc.

References Arcane::dom::DOMImplementation::_load(), and Arcane::asBytes().

Referenced by Arcane::VtkMeshIOService::_readData(), Arcane::VariableIOReaderMng::_readMetaData(), Arcane::IOMng::parseXmlBuffer(), Arcane::IOMng::parseXmlBuffer(), and Arcane::MeshReaderMng::readMesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFromFile() [1/2]

IXmlDocumentHolder * Arcane::IXmlDocumentHolder::loadFromFile ( const String & filename,
const String & schema_filename,
ITraceMng * tm )
static

Loads an XML document.

Reads and parses the XML document contained in the file filename.

The returned instance is never null. The caller owns the returned instance and must destroy it using the delete operator.

If schema_filename is not null, it indicates the XML file containing the schema used to validate the XML file.

Definition at line 452 of file DomUtils.cc.

References Arcane::dom::DOMImplementation::_load().

Here is the call graph for this function:

◆ loadFromFile() [2/2]

IXmlDocumentHolder * Arcane::IXmlDocumentHolder::loadFromFile ( const String & filename,
ITraceMng * tm )
static

Loads an XML document.

Reads and parses the XML document contained in the file filename.

The returned instance is never null. The caller owns the returned instance and must destroy it using the delete operator.

Definition at line 443 of file DomUtils.cc.

References loadFromFile().

Referenced by loadFromFile(), and Arcane::IOMng::parseXmlFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save() [1/2]

virtual String Arcane::IXmlDocumentHolder::save ( )
pure virtual

Saves this document and returns the string.

Implemented in Arcane::dom::XmlDocumentHolderLibXml2, Arcane::NullXmlDocumentHolder, and Arcane::XmlDocumentHolderLibXml2.

◆ save() [2/2]

virtual void Arcane::IXmlDocumentHolder::save ( ByteArray & bytes)
pure virtual

Saves this document into the array bytes.

Implemented in Arcane::dom::XmlDocumentHolderLibXml2, Arcane::NullXmlDocumentHolder, and Arcane::XmlDocumentHolderLibXml2.


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