Manager of a DOM document. More...
#include <arcane/core/IXmlDocumentHolder.h>
Public Member Functions | |
| virtual | ~IXmlDocumentHolder () |
| Releases resources. | |
| virtual XmlNode | documentNode ()=0 |
Document node. This node is null if the document does not exist. | |
| virtual IXmlDocumentHolder * | clone ()=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 IXmlDocumentHolder * | createNull () |
| Creates and returns a null document. | |
| static IXmlDocumentHolder * | loadFromBuffer (Span< const Byte > buffer, const String &name, ITraceMng *tm) |
| Loads an XML document. | |
| static IXmlDocumentHolder * | loadFromBuffer (ByteConstSpan buffer, const String &name, ITraceMng *tm) |
| Loads an XML document. | |
| static IXmlDocumentHolder * | loadFromFile (const String &filename, ITraceMng *tm) |
| Loads an XML document. | |
| static IXmlDocumentHolder * | loadFromFile (const String &filename, const String &schema_filename, ITraceMng *tm) |
| Loads an XML document. | |
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.
|
inlinevirtual |
Releases resources.
Definition at line 47 of file IXmlDocumentHolder.h.
|
pure virtual |
Clones this document.
Implemented in Arcane::dom::XmlDocumentHolderLibXml2, Arcane::NullXmlDocumentHolder, and Arcane::XmlDocumentHolderLibXml2.
|
static |
Creates and returns a null document.
Definition at line 44 of file NullXmlDocumentHolder.cc.
|
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().
|
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().
|
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().
|
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().
|
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().
|
pure virtual |
Saves this document and returns the string.
Implemented in Arcane::dom::XmlDocumentHolderLibXml2, Arcane::NullXmlDocumentHolder, and Arcane::XmlDocumentHolderLibXml2.
|
pure virtual |
Saves this document into the array bytes.
Implemented in Arcane::dom::XmlDocumentHolderLibXml2, Arcane::NullXmlDocumentHolder, and Arcane::XmlDocumentHolderLibXml2.