17#include "arcane/DomDeclaration.h"
18#include "arcane/utils/String.h"
38extern NodePrv* toNodePrv(
const Node& node);
43typedef String DOMString;
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;
98const UShort NOT_IMPLEMENTED_ERR = 2500;
103class ARCANE_CORE_EXPORT DOMException
106 DOMException(UShort _code) :
code(_code) {}
114class ARCANE_CORE_EXPORT DOMWriter
120 DOMWriter(DOMWriterPrv*);
121 DOMWriter(
const DOMWriter& dw);
124 const DOMWriter& operator=(
const DOMWriter& from);
127 void encoding(
const String& encoding);
131 DOMWriterPrv* _impl()
const;
133 void _checkValid()
const;
139class ARCANE_CORE_EXPORT DOMImplementation
145 bool hasFeature(
const DOMString& feature,
const DOMString& version)
const;
150 DocumentType createDocumentType(
const DOMString& qualified_name,
const DOMString& public_id,
151 const DOMString& system_id)
const;
154 Document createDocument(
const DOMString& namespace_uri,
const DOMString& qualified_name,
161 DOMImplementation getInterface(
const DOMString& feature)
const;
170 DOMImplementation(ImplementationPrv*);
171 ~DOMImplementation();
182 String _implementationName()
const;
185 static void initialize();
186 static void terminate();
188 ImplementationPrv* m_p;
189 ImplementationPrv* _impl()
const;
190 void _checkValid()
const;
196ARCANE_CORE_EXPORT
bool operator==(
const Node& n1,
const Node& n2);
197ARCANE_CORE_EXPORT
bool operator!=(
const Node& n1,
const Node& n2);
204class ARCANE_CORE_EXPORT Node
243 DOMString nodeName()
const;
248 DOMString nodeValue()
const;
249 void nodeValue(
const DOMString& value)
const;
254 UShort nodeType()
const;
259 Node parentNode()
const;
269 Node firstChild()
const;
274 Node lastChild()
const;
279 Node previousSibling()
const;
284 Node nextSibling()
const;
289 NamedNodeMap attributes()
const;
294 Document ownerDocument()
const;
299 Node insertBefore(
const Node& new_child,
const Node& ref_child)
const;
300 Node replaceChild(
const Node& new_child,
const Node& old_child)
const;
301 Node removeChild(
const Node& old_child)
const;
302 Node appendChild(
const Node& new_child)
const;
303 bool hasChildNodes()
const;
304 Node cloneNode(
bool deep)
const;
309 DOMString prefix()
const;
310 void prefix(
const DOMString& new_prefix)
const;
315 void normalize()
const;
316 bool isSupported(
const DOMString& feature,
const DOMString& version)
const;
317 DOMString namespaceURI()
const;
319 DOMString localName()
const;
356 DOMString textContent()
const;
357 void textContent(
const DOMString& value)
const;
362 DOMString baseURI()
const;
368 bool isSameNode(
const Node& node)
const;
369 UShort compareTreePosition(
const Node& other)
const;
370 bool isEqualNode(
const Node& other)
const;
371 Node getInterface(
const DOMString& feature)
const;
372 DOMString lookupNamespacePrefix(
const DOMString& namespace_uri,
bool use_default)
const;
373 bool isDefaultNamespace(
const DOMString& namespace_uri)
const;
374 DOMString lookupNamespaceURI(
const DOMString& prefix)
const;
376 DOMObject setUserData(
const DOMString& key,
const DOMObject& data,
378 DOMObject getUserData(
const DOMString& key)
const;
399 friend class IDOM_Node;
400 friend class IDOM_Document;
402 friend class Element;
403 friend class Document;
404 friend class DOMImplementation;
405 friend class NamedNodeMap;
406 friend class CharacterData;
408 friend class DOMWriter;
409 friend bool ARCANE_CORE_EXPORT operator==(
const Node& n1,
const Node& n2);
415 void _assign(
const Node&);
421 const Node& operator=(
const Node& from);
425 void _checkValid()
const;
427 NodePrv* _impl()
const;
428 friend NodePrv* toNodePrv(
const Node& node);
438class ARCANE_CORE_EXPORT Document
450 DOMImplementation implementation()
const;
455 Element documentElement()
const;
460 Element createElement(
const DOMString& tag_name)
const;
462 Text createTextNode(
const DOMString& data)
const;
463 Comment createComment(
const DOMString& data)
const;
464 CDATASection createCDATASection(
const DOMString& data)
const;
466 const DOMString& data)
const;
467 Attr createAttribute(
const DOMString& name)
const;
469 NodeList getElementsByTagName(
const DOMString& tagname)
const;
474 Node importNode(
const Node& imported_node,
bool deep)
const;
475 Element createElementNS(
const DOMString& namespace_uri,
const DOMString& qualified_name)
const;
476 Attr createAttributeNS(
const DOMString& namespace_uri,
const DOMString& qualified_name)
const;
477 NodeList getElementsByTagNameNS(
const DOMString& namespace_uri,
const DOMString& local_name)
const;
478 Element getElementById(
const DOMString& element_id)
const;
483 DOMString actualEncoding()
const;
484 void actualEncoding(
const DOMString&)
const;
489 DOMString encoding()
const;
490 void encoding(
const DOMString&)
const;
495 bool standalone()
const;
496 void standalone(
bool)
const;
501 bool strictErrorChecking()
const;
502 void strictErrorChecking(
bool)
const;
507 DOMString version()
const;
508 void version(
const DOMString&)
const;
519 DOMString documentURI()
const;
520 void documentURI(
const DOMString&)
const;
525 Node adoptNode(
const Node& source)
const;
526 void normalizeDocument();
531 Node renameNode(
const Node& node,
const DOMString& namespace_uri,
532 const DOMString& name);
536 friend class IDOM_Document;
537 friend class DOMImplementation;
540 Document(
const Node&);
541 Document(DocumentPrv*);
543 DocumentPrv* _impl()
const;
546class ARCANE_CORE_EXPORT DocumentFragment
551 DocumentFragment(DocumentFragmentPrv*);
561class ARCANE_CORE_EXPORT NodeList
566 Node item(ULong index)
const;
567 ULong length()
const;
571 NodeList(NodeListPrv*);
573 NodeListPrv* _impl()
const;
575 void _checkValid()
const;
585class ARCANE_CORE_EXPORT CharacterData
591 DOMString data()
const;
592 void data(
const DOMString&)
const;
597 ULong length()
const;
602 DOMString substringData(ULong offset,ULong count)
const;
603 void appendData(
const DOMString& arg)
const;
604 void insertData(ULong offset,
const DOMString& arg)
const;
605 void deleteData(ULong offset,ULong count)
const;
606 void replaceData(ULong offset,ULong count,
const DOMString& arg)
const;
610 CharacterData(
const Node& from);
611 CharacterData(
const CharacterData& from);
612 CharacterData(CharacterDataPrv*);
613 CharacterDataPrv* _impl()
const;
616class ARCANE_CORE_EXPORT Attr
622 DOMString name()
const;
627 bool specified()
const;
632 DOMString value()
const;
633 void value(
const DOMString& str)
const;
638 Element ownerElement()
const;
642 friend class IDOM_Attr;
643 friend class IDOM_Node;
644 friend class Element;
650 AttrPrv* _impl()
const;
656class ARCANE_CORE_EXPORT Element
663 DOMString tagName()
const;
668 DOMString getAttribute(
const DOMString& name)
const;
669 void setAttribute(
const DOMString& name,
const DOMString& value)
const;
670 void removeAttribute(
const DOMString& name)
const;
671 Attr getAttributeNode(
const DOMString& name)
const;
672 Attr setAttributeNode(
const Attr& new_attr)
const;
673 Attr removeAttributeNode(
const Attr& old_attr)
const;
674 NodeList getElementsByTagName(
const DOMString& name)
const;
677 DOMString getAttributeNS(
const DOMString& namespace_uri,
const DOMString& local_name)
const;
678 void setAttributeNS(
const DOMString& namespace_uri,
const DOMString& qualified_name,
679 const DOMString& value)
const;
680 void removeAttributeNS(
const DOMString& namespace_uri,
const DOMString& local_name)
const;
681 Attr getAttributeNodeNS(
const DOMString& namespace_uri,
const DOMString& local_name)
const;
682 Attr setAttributeNodeNS(
const Attr& new_attr)
const;
683 NodeList getElementsByTagNameNS(
const DOMString& namespace_uri,
const DOMString& local_name)
const;
684 bool hasAttribute(
const DOMString& name)
const;
685 bool hasAttributeNS(
const DOMString& namespace_uri,
const DOMString& local_name)
const;
689 Element(
const Element&);
690 Element(
const Node&);
692 Element(ElementPrv*);
693 friend class IDOM_Element;
695 friend class Document;
696 ElementPrv* _impl()
const;
702class ARCANE_CORE_EXPORT Text
703:
public CharacterData
708 Text splitText(ULong offset)
const;
712 bool isWhiteSpaceInElementContent()
const;
716 DOMString wholeText()
const;
720 Text replaceWholeText(
const DOMString& content)
const;
727 TextPrv* _impl()
const;
728 friend class Document;
734class ARCANE_CORE_EXPORT Comment
735:
public CharacterData
739 Comment(CommentPrv*);
741 CommentPrv* _impl()
const;
744class ARCANE_CORE_EXPORT CDATASection
749 CDATASection(CDATASectionPrv*);
751 CDATASectionPrv* _impl()
const;
760 DOMString name()
const;
765 NamedNodeMap entities()
const;
770 NamedNodeMap notations()
const;
774 DOMString publicId()
const;
779 DOMString systemId()
const;
784 DOMString internalSubset()
const;
787 DocumentType(DocumentTypePrv*);
791 DocumentTypePrv* _impl()
const;
803 DOMString publicId()
const;
808 DOMString systemId()
const;
811 NotationPrv* _impl()
const;
823 DOMString publicId()
const;
828 DOMString systemId()
const;
833 DOMString notationName()
const;
837 DOMString actualEncoding()
const;
838 void actualEncoding(
const DOMString&)
const;
843 DOMString encoding()
const;
844 void encoding(
const DOMString&)
const;
849 DOMString version()
const;
850 void version(
const DOMString&)
const;
853 EntityPrv* _impl()
const;
864 EntityReference(EntityReferencePrv*);
866 EntityReferencePrv* _impl()
const;
872class ARCANE_CORE_EXPORT ProcessingInstruction
879 DOMString target()
const;
884 DOMString data()
const;
885 void data(
const DOMString& value)
const;
888 ProcessingInstruction();
889 ProcessingInstruction(ProcessingInstructionPrv*);
891 ProcessingInstructionPrv* _impl()
const;
897class ARCANE_CORE_EXPORT NamedNodeMap
902 ULong length()
const;
906 Node getNamedItem(
const DOMString& name)
const;
907 Node setNamedItem(
const Node& arg)
const;
908 Node removeNamedItem(
const DOMString& name)
const;
909 Node item(ULong index)
const;
913 Node getNamedItemNS(
const DOMString& namespace_uri,
const DOMString& local_name)
const;
914 Node setNamedItemNS(
const Node& arg)
const;
915 Node removeNamedItemNS(
const DOMString& namespace_uri,
const DOMString& local_name)
const;
920 friend class IDOM_Node;
921 friend class IDOM_Element;
923 NamedNodeMap(NamedNodeMapPrv*);
925 NamedNodeMap(
const NamedNodeMap& from);
926 const NamedNodeMap& operator=(
const NamedNodeMap& from);
929 NamedNodeMapPrv* m_p;
930 NamedNodeMapPrv* _impl()
const;
958 void handle(UShort operation,
const DOMString& key,
const DOMObject& data,
959 const Node& src,
const Node& dest)
const;
980 UShort severity()
const;
985 DOMString message()
const;
990 DOMObject relatedException()
const;
999 DOMError(DOMErrorPrv*);
1001 DOMError(
const DOMError& from);
1002 const DOMError& operator=(
const DOMError& from);
1005 DOMErrorPrv* _impl()
const;
1007 void _checkValid()
const;
1018 bool handleError(
const DOMError& error)
const;
1030 long lineNumber()
const;
1034 long columnNumber()
const;
1038 long offset()
const;
1042 Node errorNode()
const;
1046 DOMString uri()
const;
1049 friend class DOMError;
1051 DOMLocator(DOMLocatorPrv*);
1053 DOMLocator(
const DOMLocator& from);
1054 const DOMLocator& operator=(
const DOMLocator& from);
1057 DOMLocatorPrv* _impl()
const;
1059 void _checkValid()
const;
1074const unsigned short INVALID_EXPRESSION_ERR = 1;
1079const unsigned short TYPE_ERR = 2;
1088 unsigned short code;
1102 const Node& context_node,
1108 const Node& context_node,
1126 DOMString lookupNamespaceURI(
const DOMString& prefix)
const;
1170 UShort resultType()
const;
1175 double numberValue()
const;
1180 DOMString stringValue()
const;
1185 bool booleanValue()
const;
1190 Node singleNodeValue()
const;
1207 Node nextNode()
const;
1215 ULong length()
const;
1220 Node item(ULong index)
const;
1239 Element ownerElement()
const;
Interface du gestionnaire de traces.
Gestionnaire d'un document DOM.
Chaîne de caractères unicode.
static const UShort SEVERITY_ERROR
The severity of the error described by the DOMError is error.
static const UShort SEVERITY_WARNING
The severity of the error described by the DOMError is warning.
static const UShort SEVERITY_FATAL_ERROR
The severity of the error described by the DOMError is fatal error.
UShort code
The code of the exception.
IXmlDocumentHolder * _load(const String &fname, ITraceMng *msg, const String &schemaname)
IXmlDocumentHolder * _newDocument()
Les méthodes suivantes sont internes à Arcane.
NodePrv * m_p
Implémentation de la classe.
static const UShort DOCUMENT_FRAGMENT_NODE
The node is a DocumentFragment.
static const UShort TREE_POSITION_PRECEDING
The node precedes the reference node.
static const UShort TREE_POSITION_ANCESTOR
The node is an ancestor of the reference node.
static const UShort ATTRIBUTE_NODE
The node is an Attr.
static const UShort ENTITY_REFERENCE_NODE
The node is an EntityReference.
static const UShort COMMENT_NODE
The node is a Comment.
static const UShort TREE_POSITION_SAME
void releaseNode()
Détruit le noeud.
static const UShort TREE_POSITION_DISCONNECTED
The two nodes are disconnected, they do not have any common ancestor.
static const UShort TREE_POSITION_DESCENDANT
The node is a descendant of the reference node.
static const UShort DOCUMENT_TYPE_NODE
The node is a DocumentType.
static const UShort TREE_POSITION_FOLLOWING
The node follows the reference node.
static const UShort ENTITY_NODE
The node is an Entity.
static const UShort DOCUMENT_NODE
The node is a Document.
static const UShort CDATA_SECTION_NODE
The node is a CDATASection.
static const UShort TREE_POSITION_EXACT_SAME
static const UShort PROCESSING_INSTRUCTION_NODE
The node is a ProcessingInstruction.
static const UShort ELEMENT_NODE
The node is an Element.
static const UShort TEXT_NODE
The node is a Text node.
static const UShort NOTATION_NODE
The node is a Notation.
static const UShort IMPORTED
The node is imported.
static const UShort CLONED
The node is cloned.
static const UShort DELETED
The node is deleted.
static const UShort XPATH_NAMESPACE_NODE
The node is a Namespace.
static const UShort NUMBER_TYPE
The result is a number as defined by XPath 1.0.
static const UShort SINGLE_NODE_TYPE
static const UShort STRING_TYPE
The result is a string as defined by XPath 1.0.
static const UShort ANY_TYPE
static const UShort BOOLEAN_TYPE
The result is a boolean as defined by XPath 1.0.
static const UShort NODE_SET_TYPE
The result is a node set as defined by XPath 1.0.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Array< Byte > ByteArray
Tableau dynamique à une dimension de caractères.
UniqueArray< Byte > ByteUniqueArray
Tableau dynamique à une dimension de caractères.
Span< const std::byte > ByteConstSpan
Vue en lecture seule d'un tableau à une dimension de caractères.
ConstArrayView< Byte > ByteConstArrayView
Equivalent C d'un tableau à une dimension de caractères.