Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IXmlDocumentHolder.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* IXmlDocumentHolder.h (C) 2000-2018 */
9/* */
10/* Interface of a DOM document manager. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IXMLDOCUMENTHOLDER_H
13#define ARCANE_IXMLDOCUMENTHOLDER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28class XmlNode;
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
42class ARCANE_CORE_EXPORT IXmlDocumentHolder
43{
44 public:
45
48
49 public:
50
52 static IXmlDocumentHolder* createNull();
53
63 static IXmlDocumentHolder*
64 loadFromBuffer(Span<const Byte> buffer, const String& name, ITraceMng* tm);
65
75 static IXmlDocumentHolder*
76 loadFromBuffer(ByteConstSpan buffer, const String& name, ITraceMng* tm);
77
87 static IXmlDocumentHolder*
88 loadFromFile(const String& filename, ITraceMng* tm);
89
102 static IXmlDocumentHolder*
103 loadFromFile(const String& filename, const String& schema_filename, ITraceMng* tm);
104
105 public:
106
108 virtual XmlNode documentNode() = 0;
109
111 virtual IXmlDocumentHolder* clone() = 0;
112
114 virtual void save(ByteArray& bytes) = 0;
115
117 virtual String save() = 0;
118};
119
120/*---------------------------------------------------------------------------*/
121/*---------------------------------------------------------------------------*/
122
123} // End namespace Arcane
124
125/*---------------------------------------------------------------------------*/
126/*---------------------------------------------------------------------------*/
127
128#endif
Declarations of types used in Arcane.
Manager of a DOM document.
virtual void save(ByteArray &bytes)=0
Saves this document into the array bytes.
virtual XmlNode documentNode()=0
Document node. This node is null if the document does not exist.
virtual String save()=0
Saves this document and returns the string.
virtual ~IXmlDocumentHolder()
Releases resources.
virtual IXmlDocumentHolder * clone()=0
Clones this document.
View of an array of elements of type T.
Definition Span.h:635
Node of a DOM tree.
Definition XmlNode.h:51
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Array< Byte > ByteArray
Dynamic one-dimensional array of characters.
Definition UtilsTypes.h:121