Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Dom.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/* Dom.h (C) 2000-2025 */
9/* */
10/* Implementation of DOM1+DOM2+DOM3(core). */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_DOM_H
13#define ARCANE_CORE_DOM_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/DomDeclaration.h"
18#include "arcane/utils/String.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25class IStringImpl;
27} // namespace Arcane
28
29namespace Arcane::dom
30{
31
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
37
38extern NodePrv* toNodePrv(const Node& node);
39
40/*---------------------------------------------------------------------------*/
41/*---------------------------------------------------------------------------*/
42
43typedef String DOMString;
44
45/*---------------------------------------------------------------------------*/
46/*---------------------------------------------------------------------------*/
47
55
56const UShort INDEX_SIZE_ERR = 1;
58const UShort DOMSTRING_SIZE_ERR = 2;
60const UShort HIERARCHY_REQUEST_ERR = 3;
63const UShort WRONG_DOCUMENT_ERR = 4;
68const UShort INVALID_CHARACTER_ERR = 5;
70const UShort NO_DATA_ALLOWED_ERR = 6;
73const UShort NO_MODIFICATION_ALLOWED_ERR = 7;
76const UShort NOT_FOUND_ERR = 8;
79const UShort NOT_SUPPORTED_ERR = 9;
82const UShort INUSE_ATTRIBUTE_ERR = 10;
85const UShort INVALID_STATE_ERR = 11;
87const UShort SYNTAX_ERR = 12;
89const UShort INVALID_MODIFICATION_ERR = 13;
92const UShort NAMESPACE_ERR = 14;
95const UShort INVALID_ACCESS_ERR = 15;
97
98const UShort NOT_IMPLEMENTED_ERR = 2500;
99
100/*---------------------------------------------------------------------------*/
101/*---------------------------------------------------------------------------*/
102
103class ARCANE_CORE_EXPORT DOMException
104{
105 public:
106
107 DOMException(UShort _code)
108 : code(_code)
109 {}
110
111 public:
112
113 UShort code;
114};
115
116/*---------------------------------------------------------------------------*/
117/*---------------------------------------------------------------------------*/
118
119class ARCANE_CORE_EXPORT DOMWriter
120{
121 public:
122
125 DOMWriter();
126 DOMWriter(DOMWriterPrv*);
127 DOMWriter(const DOMWriter& dw);
128 ~DOMWriter();
130 const DOMWriter& operator=(const DOMWriter& from);
131
132 public:
133
134 ByteUniqueArray writeNode(const Node& node) const;
135 void encoding(const String& encoding);
136 String encoding() const;
137
138 private:
139
140 DOMWriterPrv* m_p;
141 DOMWriterPrv* _impl() const;
142 bool _null() const;
143 void _checkValid() const;
144};
145
146/*---------------------------------------------------------------------------*/
147/*---------------------------------------------------------------------------*/
148
149class ARCANE_CORE_EXPORT DOMImplementation
150{
151 public:
152
155 bool hasFeature(const DOMString& feature, const DOMString& version) const;
157
160 DocumentType createDocumentType(const DOMString& qualified_name, const DOMString& public_id,
161 const DOMString& system_id) const;
162
163 private:
164
165 Document createDocument(const DOMString& namespace_uri, const DOMString& qualified_name,
166 const DocumentType& doctype) const;
167
168 public:
169
171
174 DOMImplementation getInterface(const DOMString& feature) const;
176
177 DOMWriter createDOMWriter() const;
178
179 public:
180
183 DOMImplementation();
184 DOMImplementation(ImplementationPrv*);
185 ~DOMImplementation();
187
188 public:
189
191
193 IXmlDocumentHolder* _load(const String& fname, ITraceMng* msg, const String& schemaname);
194 IXmlDocumentHolder* _load(const String& fname, ITraceMng* msg, const String& schemaname, ByteConstArrayView schema_data);
195 IXmlDocumentHolder* _load(ByteConstSpan buffer, const String& name, ITraceMng* trace);
196 void _save(ByteArray& bytes, const Document& document, int indent_level);
197 String _implementationName() const;
199 public:
200
201 static void initialize();
202 static void terminate();
203
204 private:
205
206 ImplementationPrv* m_p;
207 ImplementationPrv* _impl() const;
208 void _checkValid() const;
209};
210
211/*---------------------------------------------------------------------------*/
212/*---------------------------------------------------------------------------*/
213
214ARCANE_CORE_EXPORT bool operator==(const Node& n1, const Node& n2);
215ARCANE_CORE_EXPORT bool operator!=(const Node& n1, const Node& n2);
216//class NodePrv;
217
222class ARCANE_CORE_EXPORT Node
223{
224 public:
225
231
232 static const UShort ELEMENT_NODE = 1;
234 static const UShort ATTRIBUTE_NODE = 2;
236 static const UShort TEXT_NODE = 3;
238 static const UShort CDATA_SECTION_NODE = 4;
240 static const UShort ENTITY_REFERENCE_NODE = 5;
242 static const UShort ENTITY_NODE = 6;
244 static const UShort PROCESSING_INSTRUCTION_NODE = 7;
246 static const UShort COMMENT_NODE = 8;
248 static const UShort DOCUMENT_NODE = 9;
250 static const UShort DOCUMENT_TYPE_NODE = 10;
252 static const UShort DOCUMENT_FRAGMENT_NODE = 11;
254 static const UShort NOTATION_NODE = 12;
256
257 public:
258
261 DOMString nodeName() const;
263
266 DOMString nodeValue() const;
267 void nodeValue(const DOMString& value) const;
269
272 UShort nodeType() const;
274
277 Node parentNode() const;
279
282 NodeList childNodes() const;
284
287 Node firstChild() const;
289
292 Node lastChild() const;
294
297 Node previousSibling() const;
299
302 Node nextSibling() const;
304
307 NamedNodeMap attributes() const;
309
312 Document ownerDocument() const;
314
317 Node insertBefore(const Node& new_child, const Node& ref_child) const;
318 Node replaceChild(const Node& new_child, const Node& old_child) const;
319 Node removeChild(const Node& old_child) const;
320 Node appendChild(const Node& new_child) const;
321 bool hasChildNodes() const;
322 Node cloneNode(bool deep) const;
324
327 DOMString prefix() const;
328 void prefix(const DOMString& new_prefix) const;
330
333 void normalize() const;
334 bool isSupported(const DOMString& feature, const DOMString& version) const;
335 DOMString namespaceURI() const;
336
337 DOMString localName() const;
339
351
352 static const UShort TREE_POSITION_PRECEDING = 0x01;
354 static const UShort TREE_POSITION_FOLLOWING = 0x02;
356 static const UShort TREE_POSITION_ANCESTOR = 0x04;
358 static const UShort TREE_POSITION_DESCENDANT = 0x08;
361 static const UShort TREE_POSITION_SAME = 0x10;
367 static const UShort TREE_POSITION_EXACT_SAME = 0x20;
369 static const UShort TREE_POSITION_DISCONNECTED = 0x00;
371
374 DOMString textContent() const;
375 void textContent(const DOMString& value) const;
377
380 DOMString baseURI() const;
382
385 bool isSameNode(const Node& node) const;
386 UShort compareTreePosition(const Node& other) const;
387 bool isEqualNode(const Node& other) const;
388 Node getInterface(const DOMString& feature) const;
389 DOMString lookupNamespacePrefix(const DOMString& namespace_uri, bool use_default) const;
390 bool isDefaultNamespace(const DOMString& namespace_uri) const;
391 DOMString lookupNamespaceURI(const DOMString& prefix) const;
392 //void normalizeNS() const;
393 DOMObject setUserData(const DOMString& key, const DOMObject& data,
394 const UserDataHandler& handler) const;
395 DOMObject getUserData(const DOMString& key) const;
397
408 void releaseNode();
409
410 public:
411
412 bool _null() const;
413
414 public:
415
416 friend class IDOM_Node;
417 friend class IDOM_Document;
418 friend class Attr;
419 friend class Element;
420 friend class Document;
421 friend class DOMImplementation;
422 friend class NamedNodeMap;
423 friend class CharacterData;
424 friend class Text;
425 friend class DOMWriter;
426 friend bool ARCANE_CORE_EXPORT operator==(const Node& n1, const Node& n2);
427
428 protected:
429
430 NodePrv* m_p;
431 //void* m_p;
432 void _assign(const Node&);
433
434 public:
435
436 Node();
437 Node(const Node&);
438 virtual ~Node();
439 const Node& operator=(const Node& from);
440
441 public:
442
443 Node(NodePrv*);
444
445 protected:
446
447 void _checkValid() const;
448
449 protected:
450
451 NodePrv* _impl() const;
452 friend NodePrv* toNodePrv(const Node& node);
453};
454
455/*---------------------------------------------------------------------------*/
456/*---------------------------------------------------------------------------*/
457
462class ARCANE_CORE_EXPORT Document
463: public Node
464{
465 public:
466
469 DocumentType doctype() const;
471
474 DOMImplementation implementation() const;
476
479 Element documentElement() const;
481
483
484 Element createElement(const DOMString& tag_name) const;
485 DocumentFragment createDocumentFragment() const;
486 Text createTextNode(const DOMString& data) const;
487 Comment createComment(const DOMString& data) const;
488 CDATASection createCDATASection(const DOMString& data) const;
489 ProcessingInstruction createProcessingInstruction(const DOMString& target,
490 const DOMString& data) const;
491 Attr createAttribute(const DOMString& name) const;
492 EntityReference createEntityReference(const DOMString& name) const;
493 NodeList getElementsByTagName(const DOMString& tagname) const;
495
497
498 Node importNode(const Node& imported_node, bool deep) const;
499 Element createElementNS(const DOMString& namespace_uri, const DOMString& qualified_name) const;
500 Attr createAttributeNS(const DOMString& namespace_uri, const DOMString& qualified_name) const;
501 NodeList getElementsByTagNameNS(const DOMString& namespace_uri, const DOMString& local_name) const;
502 Element getElementById(const DOMString& element_id) const;
504
507 DOMString actualEncoding() const;
508 void actualEncoding(const DOMString&) const;
510
513 DOMString encoding() const;
514 void encoding(const DOMString&) const;
516
519 bool standalone() const;
520 void standalone(bool) const;
522
525 bool strictErrorChecking() const;
526 void strictErrorChecking(bool) const;
528
531 DOMString version() const;
532 void version(const DOMString&) const;
534
537 DOMErrorHandler errorHandler() const;
538 void errorHandler(const DOMErrorHandler&) const;
540
543 DOMString documentURI() const;
544 void documentURI(const DOMString&) const;
546
548
549 Node adoptNode(const Node& source) const;
550 void normalizeDocument();
551 /*
552 void setNormalizationFeature(const DOMString& name,bool state);
553 bool getNormalizationFeature(const DOMString& name) const;
554 */
555 Node renameNode(const Node& node, const DOMString& namespace_uri,
556 const DOMString& name);
558
559 public:
560
561 friend class IDOM_Document;
562 friend class DOMImplementation;
563
564 public:
565
566 Document();
567 Document(const Node&);
568 Document(DocumentPrv*);
569
570 private:
571
572 DocumentPrv* _impl() const;
573};
574
575class ARCANE_CORE_EXPORT DocumentFragment
576: public Node
577{
578 public:
579
580 DocumentFragment();
581 DocumentFragment(DocumentFragmentPrv*);
582};
583
584/*---------------------------------------------------------------------------*/
585/*---------------------------------------------------------------------------*/
586
591class ARCANE_CORE_EXPORT NodeList
592{
593 public:
594
596
597 Node item(ULong index) const;
598 ULong length() const;
600 public:
601
602 NodeList();
603 NodeList(NodeListPrv*);
604
605 private:
606
607 NodeListPrv* _impl() const;
608 NodeListPrv* m_p;
609 void _checkValid() const;
610};
611
612/*---------------------------------------------------------------------------*/
613/*---------------------------------------------------------------------------*/
614
619class ARCANE_CORE_EXPORT CharacterData
620: public Node
621{
622 public:
623
626 DOMString data() const;
627 void data(const DOMString&) const;
629
632 ULong length() const;
634
636
637 DOMString substringData(ULong offset, ULong count) const;
638 void appendData(const DOMString& arg) const;
639 void insertData(ULong offset, const DOMString& arg) const;
640 void deleteData(ULong offset, ULong count) const;
641 void replaceData(ULong offset, ULong count, const DOMString& arg) const;
643 protected:
644
645 CharacterData();
646 CharacterData(const Node& from);
647 CharacterData(const CharacterData& from);
648 CharacterData(CharacterDataPrv*);
649 CharacterDataPrv* _impl() const;
650};
651
652class ARCANE_CORE_EXPORT Attr
653: public Node
654{
655 public:
656
659 DOMString name() const;
661
664 bool specified() const;
666
669 DOMString value() const;
670 void value(const DOMString& str) const;
672
675 Element ownerElement() const;
677
678 public:
679
680 friend class IDOM_Attr;
681 friend class IDOM_Node;
682 friend class Element;
683
684 public:
685
686 Attr() = default;
687 Attr(const Node&);
688 Attr(AttrPrv*);
689
690 private:
691
692 AttrPrv* _impl() const;
693};
694
695/*---------------------------------------------------------------------------*/
696/*---------------------------------------------------------------------------*/
697
698class ARCANE_CORE_EXPORT Element
699: public Node
700{
701 public:
702
705 DOMString tagName() const;
707
710 DOMString getAttribute(const DOMString& name) const;
711 void setAttribute(const DOMString& name, const DOMString& value) const;
712 void removeAttribute(const DOMString& name) const;
713 Attr getAttributeNode(const DOMString& name) const;
714 Attr setAttributeNode(const Attr& new_attr) const;
715 Attr removeAttributeNode(const Attr& old_attr) const;
716 NodeList getElementsByTagName(const DOMString& name) const;
718
719 DOMString getAttributeNS(const DOMString& namespace_uri, const DOMString& local_name) const;
720 void setAttributeNS(const DOMString& namespace_uri, const DOMString& qualified_name,
721 const DOMString& value) const;
722 void removeAttributeNS(const DOMString& namespace_uri, const DOMString& local_name) const;
723 Attr getAttributeNodeNS(const DOMString& namespace_uri, const DOMString& local_name) const;
724 Attr setAttributeNodeNS(const Attr& new_attr) const;
725 NodeList getElementsByTagNameNS(const DOMString& namespace_uri, const DOMString& local_name) const;
726 bool hasAttribute(const DOMString& name) const;
727 bool hasAttributeNS(const DOMString& namespace_uri, const DOMString& local_name) const;
729 public:
730
731 Element();
732 Element(const Element&);
733 Element(const Node&);
734
735 private:
736
737 Element(ElementPrv*);
738 friend class IDOM_Element;
739 friend class Attr;
740 friend class Document;
741 ElementPrv* _impl() const;
742};
743
744/*---------------------------------------------------------------------------*/
745/*---------------------------------------------------------------------------*/
746
747class ARCANE_CORE_EXPORT Text
748: public CharacterData
749{
750 public:
751
754 Text splitText(ULong offset) const;
756
758 bool isWhiteSpaceInElementContent() const;
760
762 DOMString wholeText() const;
764
766 Text replaceWholeText(const DOMString& content) const;
768 public:
769
770 Text();
771 Text(const Text&);
772 Text(const Node&);
773 Text(TextPrv*);
774 TextPrv* _impl() const;
775 friend class Document;
776};
777
778/*---------------------------------------------------------------------------*/
779/*---------------------------------------------------------------------------*/
780
781class ARCANE_CORE_EXPORT Comment
782: public CharacterData
783{
784 public:
785
786 Comment();
787 Comment(CommentPrv*);
788
789 private:
790
791 CommentPrv* _impl() const;
792};
793
794class ARCANE_CORE_EXPORT CDATASection
795: public Text
796{
797 public:
798
799 CDATASection();
800 CDATASection(CDATASectionPrv*);
801
802 private:
803
804 CDATASectionPrv* _impl() const;
805};
806
807class DocumentType
808: public Node
809{
810 public:
811
814 DOMString name() const;
816
819 NamedNodeMap entities() const;
821
824 NamedNodeMap notations() const;
826
828 DOMString publicId() const;
830
833 DOMString systemId() const;
835
838 DOMString internalSubset() const;
840 public:
841
842 DocumentType(DocumentTypePrv*);
843 DocumentType();
844
845 private:
846
848 DocumentTypePrv* _impl() const;
849};
850
851/*---------------------------------------------------------------------------*/
852/*---------------------------------------------------------------------------*/
853
854class ARCANE_CORE_EXPORT Notation
855: public Node
856{
857 public:
858
861 DOMString publicId() const;
863
866 DOMString systemId() const;
868 private:
869
870 NotationPrv* _impl() const;
871};
872
873/*---------------------------------------------------------------------------*/
874/*---------------------------------------------------------------------------*/
875
876class ARCANE_CORE_EXPORT Entity
877: public Node
878{
879 public:
880
883 DOMString publicId() const;
885
888 DOMString systemId() const;
890
893 DOMString notationName() const;
895
897 DOMString actualEncoding() const;
898 void actualEncoding(const DOMString&) const;
900
903 DOMString encoding() const;
904 void encoding(const DOMString&) const;
906
909 DOMString version() const;
910 void version(const DOMString&) const;
912 private:
913
914 EntityPrv* _impl() const;
915};
916
917/*---------------------------------------------------------------------------*/
918/*---------------------------------------------------------------------------*/
919
920class EntityReference
921: public Node
922{
923 public:
924
925 EntityReference();
926 EntityReference(EntityReferencePrv*);
927
928 private:
929
930 EntityReferencePrv* _impl() const;
931};
932
933/*---------------------------------------------------------------------------*/
934/*---------------------------------------------------------------------------*/
935
936class ARCANE_CORE_EXPORT ProcessingInstruction
937: public Node
938{
939 public:
940
943 DOMString target() const;
945
948 DOMString data() const;
949 void data(const DOMString& value) const;
951 public:
952
953 ProcessingInstruction();
954 ProcessingInstruction(ProcessingInstructionPrv*);
955
956 private:
957
958 ProcessingInstructionPrv* _impl() const;
959};
960
961/*---------------------------------------------------------------------------*/
962/*---------------------------------------------------------------------------*/
963
964class ARCANE_CORE_EXPORT NamedNodeMap
965{
966 public:
967
970 ULong length() const;
972
974 Node getNamedItem(const DOMString& name) const;
975 Node setNamedItem(const Node& arg) const;
976 Node removeNamedItem(const DOMString& name) const;
977 Node item(ULong index) const;
979
981 Node getNamedItemNS(const DOMString& namespace_uri, const DOMString& local_name) const;
982 Node setNamedItemNS(const Node& arg) const;
983 Node removeNamedItemNS(const DOMString& namespace_uri, const DOMString& local_name) const;
985 public:
986
987 bool _null() const;
988
989 public:
990
991 friend class IDOM_Node;
992 friend class IDOM_Element;
993 NamedNodeMap();
994 NamedNodeMap(NamedNodeMapPrv*);
995 ~NamedNodeMap();
996 NamedNodeMap(const NamedNodeMap& from);
997 const NamedNodeMap& operator=(const NamedNodeMap& from);
998
999 private:
1000
1001 //AutoRefT<NamedNodeMapPrv> m_p;
1002 NamedNodeMapPrv* m_p;
1003 NamedNodeMapPrv* _impl() const;
1004};
1005
1006/*---------------------------------------------------------------------------*/
1007/*---------------------------------------------------------------------------*/
1008
1010{
1011 public:
1012
1013 DOMImplementation getDOMImplementation(const DOMString& features) const;
1014};
1015
1016/*---------------------------------------------------------------------------*/
1017/*---------------------------------------------------------------------------*/
1018
1020{
1021 public:
1022
1024
1025
1026 static const UShort CLONED = 1;
1028 static const UShort IMPORTED = 2;
1030 static const UShort DELETED = 3;
1032
1033 void handle(UShort operation, const DOMString& key, const DOMObject& data,
1034 const Node& src, const Node& dest) const;
1035};
1036
1037/*---------------------------------------------------------------------------*/
1038/*---------------------------------------------------------------------------*/
1039
1040class DOMError
1041{
1042 public:
1043
1045
1046
1047 static const UShort SEVERITY_WARNING = 0;
1049 static const UShort SEVERITY_ERROR = 1;
1051 static const UShort SEVERITY_FATAL_ERROR = 2;
1053
1056 UShort severity() const;
1058
1061 DOMString message() const;
1063
1066 DOMObject relatedException() const;
1068
1071 DOMLocator location() const;
1073 public:
1074
1075 DOMError();
1076 DOMError(DOMErrorPrv*);
1077 ~DOMError();
1078 DOMError(const DOMError& from);
1079 const DOMError& operator=(const DOMError& from);
1080
1081 private:
1082
1083 DOMErrorPrv* m_p;
1084 DOMErrorPrv* _impl() const;
1085 bool _null() const;
1086 void _checkValid() const;
1087};
1088
1089/*---------------------------------------------------------------------------*/
1090/*---------------------------------------------------------------------------*/
1091
1093{
1094 public:
1095
1098 bool handleError(const DOMError& error) const;
1100};
1101
1102/*---------------------------------------------------------------------------*/
1103/*---------------------------------------------------------------------------*/
1104
1105class DOMLocator
1106{
1107 public:
1108
1111 long lineNumber() const;
1113
1115 long columnNumber() const;
1117
1119 long offset() const;
1121
1123 Node errorNode() const;
1125
1127 DOMString uri() const;
1129 public:
1130
1131 friend class DOMError;
1132 DOMLocator();
1133 DOMLocator(DOMLocatorPrv*);
1134 ~DOMLocator();
1135 DOMLocator(const DOMLocator& from);
1136 const DOMLocator& operator=(const DOMLocator& from);
1137
1138 private:
1139
1140 DOMLocatorPrv* m_p;
1141 DOMLocatorPrv* _impl() const;
1142 bool _null() const;
1143 void _checkValid() const;
1144};
1145
1146/*---------------------------------------------------------------------------*/
1147/*---------------------------------------------------------------------------*/
1148
1150
1151
1158const unsigned short INVALID_EXPRESSION_ERR = 1;
1163const unsigned short TYPE_ERR = 2;
1165
1166/*---------------------------------------------------------------------------*/
1167/*---------------------------------------------------------------------------*/
1168
1170{
1171 public:
1172
1173 unsigned short code;
1174};
1175
1176/*---------------------------------------------------------------------------*/
1177/*---------------------------------------------------------------------------*/
1178
1180{
1181 public:
1182
1183 XPathExpression createExpression(const DOMString& expression,
1184 const XPathNSResolver& resolver) const;
1185 XPathResult createResult() const;
1186 XPathNSResolver createNSResolver(const Node& node_resolver) const;
1187 XPathResult evaluate(const DOMString& expression,
1188 const Node& context_node,
1189 const XPathNSResolver& resolver,
1190 UShort type,
1191 const XPathResult& result) const;
1192
1193 XPathResult evaluateExpression(const XPathExpression& expression,
1194 const Node& context_node,
1195 UShort type,
1196 const XPathResult& result) const;
1197};
1198
1199/*---------------------------------------------------------------------------*/
1200/*---------------------------------------------------------------------------*/
1201
1203{
1204};
1205
1206/*---------------------------------------------------------------------------*/
1207/*---------------------------------------------------------------------------*/
1208
1210{
1211 public:
1212
1213 DOMString lookupNamespaceURI(const DOMString& prefix) const;
1214};
1215
1216/*---------------------------------------------------------------------------*/
1217/*---------------------------------------------------------------------------*/
1218
1220{
1221 public:
1222
1224
1225
1231 static const UShort ANY_TYPE = 0;
1233 static const UShort NUMBER_TYPE = 1;
1235 static const UShort STRING_TYPE = 2;
1237 static const UShort BOOLEAN_TYPE = 3;
1239 static const UShort NODE_SET_TYPE = 4;
1253 static const UShort SINGLE_NODE_TYPE = 5;
1255
1258 UShort resultType() const;
1260
1263 double numberValue() const;
1265
1268 DOMString stringValue() const;
1270
1273 bool booleanValue() const;
1275
1278 Node singleNodeValue() const;
1280
1283 XPathSetIterator getSetIterator(bool ordered) const;
1284 XPathSetSnapshot getSetSnapshot(bool ordered) const;
1286};
1287
1288/*---------------------------------------------------------------------------*/
1289/*---------------------------------------------------------------------------*/
1290
1292{
1293 public:
1294
1295 Node nextNode() const;
1296};
1297
1299{
1300 public:
1301
1304 ULong length() const;
1306
1309 Node item(ULong index) const;
1311};
1312
1313/*---------------------------------------------------------------------------*/
1314/*---------------------------------------------------------------------------*/
1315
1317: public Node
1318{
1319 public:
1320
1322
1323
1324 static const UShort XPATH_NAMESPACE_NODE = 13;
1326
1329 Element ownerElement() const;
1331};
1332
1333/*---------------------------------------------------------------------------*/
1334/*---------------------------------------------------------------------------*/
1335
1336} // namespace Arcane::dom
1337
1338/*---------------------------------------------------------------------------*/
1339/*---------------------------------------------------------------------------*/
1340
1341#endif
Manager of a DOM document.
static const UShort SEVERITY_ERROR
The severity of the error described by the DOMError is error.
Definition Dom.h:1049
static const UShort SEVERITY_WARNING
The severity of the error described by the DOMError is warning.
Definition Dom.h:1047
static const UShort SEVERITY_FATAL_ERROR
The severity of the error described by the DOMError is fatal error.
Definition Dom.h:1051
UShort code
The code of the exception.
Definition Dom.h:113
Document createDocument(const DOMString &namespace_uri, const DOMString &qualified_name, const DocumentType &doctype) const
IXmlDocumentHolder * _load(const String &fname, ITraceMng *msg, const String &schemaname)
IXmlDocumentHolder * _newDocument()
The following methods are internal to Arcane.
friend class Document
GenericDocument with UTF8 encoding.
Definition Dom.h:740
NodePrv * m_p
Class implementation.
Definition Dom.h:430
static const UShort DOCUMENT_FRAGMENT_NODE
The node is a DocumentFragment.
Definition Dom.h:252
static const UShort TREE_POSITION_PRECEDING
The node precedes the reference node.
Definition Dom.h:352
static const UShort TREE_POSITION_ANCESTOR
The node is an ancestor of the reference node.
Definition Dom.h:356
static const UShort ATTRIBUTE_NODE
The node is an Attr.
Definition Dom.h:234
static const UShort ENTITY_REFERENCE_NODE
The node is an EntityReference.
Definition Dom.h:240
static const UShort COMMENT_NODE
The node is a Comment.
Definition Dom.h:246
static const UShort TREE_POSITION_SAME
Definition Dom.h:361
void releaseNode()
Destroys the node.
static const UShort TREE_POSITION_DISCONNECTED
The two nodes are disconnected, they do not have any common ancestor.
Definition Dom.h:369
static const UShort TREE_POSITION_DESCENDANT
The node is a descendant of the reference node.
Definition Dom.h:358
friend class Document
GenericDocument with UTF8 encoding.
Definition Dom.h:420
static const UShort DOCUMENT_TYPE_NODE
The node is a DocumentType.
Definition Dom.h:250
static const UShort TREE_POSITION_FOLLOWING
The node follows the reference node.
Definition Dom.h:354
static const UShort ENTITY_NODE
The node is an Entity.
Definition Dom.h:242
static const UShort DOCUMENT_NODE
The node is a Document.
Definition Dom.h:248
static const UShort CDATA_SECTION_NODE
The node is a CDATASection.
Definition Dom.h:238
static const UShort TREE_POSITION_EXACT_SAME
Definition Dom.h:367
static const UShort PROCESSING_INSTRUCTION_NODE
The node is a ProcessingInstruction.
Definition Dom.h:244
static const UShort ELEMENT_NODE
The node is an Element.
Definition Dom.h:232
static const UShort TEXT_NODE
The node is a Text node.
Definition Dom.h:236
static const UShort NOTATION_NODE
The node is a Notation.
Definition Dom.h:254
friend class Document
GenericDocument with UTF8 encoding.
Definition Dom.h:775
static const UShort IMPORTED
The node is imported.
Definition Dom.h:1028
static const UShort CLONED
The node is cloned.
Definition Dom.h:1026
static const UShort DELETED
The node is deleted.
Definition Dom.h:1030
static const UShort XPATH_NAMESPACE_NODE
The node is a Namespace.
Definition Dom.h:1324
static const UShort NUMBER_TYPE
The result is a number as defined by XPath 1.0.
Definition Dom.h:1233
static const UShort SINGLE_NODE_TYPE
Definition Dom.h:1253
static const UShort STRING_TYPE
The result is a string as defined by XPath 1.0.
Definition Dom.h:1235
static const UShort ANY_TYPE
Definition Dom.h:1231
static const UShort BOOLEAN_TYPE
The result is a boolean as defined by XPath 1.0.
Definition Dom.h:1237
static const UShort NODE_SET_TYPE
The result is a node set as defined by XPath 1.0.
Definition Dom.h:1239
GenericDocument< UTF8<> > Document
GenericDocument with UTF8 encoding.
Definition document.h:2891
-- 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
UniqueArray< Byte > ByteUniqueArray
Dynamic 1D array of characters.
Definition UtilsTypes.h:335
ConstArrayView< Byte > ByteConstArrayView
C equivalent of a 1D array of characters.
Definition UtilsTypes.h:476