CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
xml_document.h
1
2
3#pragma once
4
5#include <xml/xml_node_type.h>
6#include <xml/xml_node_changed_event_handler.h>
7#include <xml/xml_node.h>
8#include <xml/schema/validation_event_handler.h>
9#include <system/string.h>
10
11
13namespace System
14{
15namespace Collections
16{
17namespace Generic
18{
19template <typename, typename> class Dictionary;
20template <typename> class List;
21} // namespace Generic
22} // namespace Collections
23namespace IO
24{
25class Stream;
26class TextReader;
27class TextWriter;
28} // namespace IO
29namespace Text
30{
31class Encoding;
32} // namespace Text
33template <typename... Args> class WeakReference;
34namespace Xml
35{
36class DocumentSchemaValidator;
37class DocumentXmlWriter;
38class DocumentXPathNavigator;
39class DomNameTable;
40class EmptyEnumerator;
41namespace Schema
42{
43class IXmlSchemaInfo;
44class SchemaAttDef;
45class SchemaElementDecl;
46class SchemaInfo;
47class XmlSchemaSet;
48} // namespace Schema
49class XmlAttribute;
50class XmlAttributeCollection;
51class XmlCDataSection;
52class XmlCharacterData;
53class XmlChildNodes;
54class XmlComment;
55class XmlDeclaration;
56class XmlDocumentFragment;
57class XmlDocumentType;
58class XmlElement;
59class XmlEntity;
60class XmlEntityReference;
61class XmlImplementation;
62class XmlLinkedNode;
63class XmlLoader;
64class XmlName;
65class XmlNamedNodeMap;
66class XmlNameEx;
67class XmlNameTable;
68enum class XmlNodeChangedAction;
69class XmlNodeChangedEventArgs;
70class XmlNodeList;
71class XmlNodeReader;
72class XmlNodeReaderNavigator;
73class XmlProcessingInstruction;
74class XmlReader;
75class XmlResolver;
76class XmlSignificantWhitespace;
77class XmlText;
78class XmlTextReader;
79class XmlUnspecifiedAttribute;
80class XmlWhitespace;
81class XmlWriter;
82namespace XPath
83{
84class XPathNavigator;
85enum class XPathNodeType;
86} // namespace XPath
87} // namespace Xml
88} // namespace System
90
91namespace System {
92
93namespace Xml {
94
99class ASPOSECPP_SHARED_CLASS XmlDocument : public XmlNode
100{
101 typedef XmlDocument ThisType;
102 typedef XmlNode BaseType;
103
104 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
105 ASPOSECPP_SHARED_RTTI_INFO_DECL();
106
107public:
108
111
112private:
114 friend class DocumentSchemaValidator;
115 friend class DocumentXmlWriter;
116 friend class DocumentXPathNavigator;
117 friend class XmlAttribute;
118 friend class XmlNode;
119 friend class XmlAttributeCollection;
120 friend class XmlNamedNodeMap;
121 friend class XmlCDataSection;
122 friend class XmlCharacterData;
123 friend class XmlChildNodes;
124 friend class XmlComment;
125 friend class XmlDocumentFragment;
126 friend class XmlDocumentType;
127 friend class XmlElement;
128 friend class XmlEntityReference;
129 friend class XmlImplementation;
130 friend class XmlLoader;
131 friend class XmlNameEx;
132 friend class XmlNamedNodeMap;
133 friend class XmlNodeReader;
134 friend class XmlNodeReaderNavigator;
135 friend class XmlSignificantWhitespace;
136 friend class XmlText;
137 friend class XmlUnspecifiedAttribute;
138 friend class XmlWhitespace;
140
141public:
142
155
158 ASPOSECPP_SHARED_API XmlNodeType get_NodeType() override;
161 virtual ASPOSECPP_SHARED_API SharedPtr<XmlDocumentType> get_DocumentType();
167 ASPOSECPP_SHARED_API String get_Name() override;
170 ASPOSECPP_SHARED_API String get_LocalName() override;
176 ASPOSECPP_SHARED_API SharedPtr<XmlDocument> get_OwnerDocument() override;
183 ASPOSECPP_SHARED_API void set_Schemas(const SharedPtr<Schema::XmlSchemaSet>& value);
187 virtual ASPOSECPP_SHARED_API void set_XmlResolver(SharedPtr<System::Xml::XmlResolver> value);
193 ASPOSECPP_SHARED_API bool get_PreserveWhitespace();
196 ASPOSECPP_SHARED_API void set_PreserveWhitespace(bool value);
199 ASPOSECPP_SHARED_API bool get_IsReadOnly() override;
203 ASPOSECPP_SHARED_API void set_InnerText(String value) override;
206 ASPOSECPP_SHARED_API String get_InnerXml() override;
210 ASPOSECPP_SHARED_API void set_InnerXml(String value) override;
213 ASPOSECPP_SHARED_API SharedPtr<Schema::IXmlSchemaInfo> get_SchemaInfo() override;
216 ASPOSECPP_SHARED_API String get_BaseURI() override;
217
219 ASPOSECPP_SHARED_API XmlDocument();
222 ASPOSECPP_SHARED_API XmlDocument(const SharedPtr<XmlNameTable>& nt);
223
227 ASPOSECPP_SHARED_API SharedPtr<XmlNode> CloneNode(bool deep) override;
235 ASPOSECPP_SHARED_API SharedPtr<XmlAttribute> CreateAttribute(const String& name);
239 virtual ASPOSECPP_SHARED_API SharedPtr<XmlCDataSection> CreateCDataSection(const String& data);
243 virtual ASPOSECPP_SHARED_API SharedPtr<XmlComment> CreateComment(const String& data);
251 virtual ASPOSECPP_SHARED_API SharedPtr<XmlDocumentType> CreateDocumentType(const String& name, const String& publicId, const String& systemId, const String& internalSubset);
261 ASPOSECPP_SHARED_API SharedPtr<XmlElement> CreateElement(const String& name);
266 virtual ASPOSECPP_SHARED_API SharedPtr<XmlEntityReference> CreateEntityReference(const String& name);
271 virtual ASPOSECPP_SHARED_API SharedPtr<XmlProcessingInstruction> CreateProcessingInstruction(const String& target, const String& data);
287 virtual ASPOSECPP_SHARED_API SharedPtr<XmlDeclaration> CreateXmlDeclaration(const String& version, const String& encoding, const String& standalone);
291 virtual ASPOSECPP_SHARED_API SharedPtr<XmlText> CreateTextNode(const String& text);
298 ASPOSECPP_SHARED_API SharedPtr<XPath::XPathNavigator> CreateNavigator() override;
302 virtual ASPOSECPP_SHARED_API SharedPtr<XmlWhitespace> CreateWhitespace(const String& text);
308 virtual ASPOSECPP_SHARED_API SharedPtr<XmlNodeList> GetElementsByTagName(String name);
316 ASPOSECPP_SHARED_API SharedPtr<XmlAttribute> CreateAttribute(const String& qualifiedName, const String& namespaceURI);
324 ASPOSECPP_SHARED_API SharedPtr<XmlElement> CreateElement(const String& qualifiedName, const String& namespaceURI);
331 virtual ASPOSECPP_SHARED_API SharedPtr<XmlNodeList> GetElementsByTagName(String localName, String namespaceURI);
335 virtual ASPOSECPP_SHARED_API SharedPtr<XmlElement> GetElementById(String elementId);
341 virtual ASPOSECPP_SHARED_API SharedPtr<XmlNode> ImportNode(SharedPtr<XmlNode> node, bool deep);
348 virtual ASPOSECPP_SHARED_API SharedPtr<XmlAttribute> CreateAttribute(const String& prefix, const String& localName, const String& namespaceURI);
354 virtual ASPOSECPP_SHARED_API SharedPtr<XmlElement> CreateElement(const String& prefix, const String& localName, const String& namespaceURI);
362 virtual ASPOSECPP_SHARED_API SharedPtr<XmlNode> CreateNode(XmlNodeType type, const String& prefix, const String& name, const String& namespaceURI);
388 virtual ASPOSECPP_SHARED_API SharedPtr<XmlNode> CreateNode(const String& nodeTypeString, const String& name, const String& namespaceURI);
396 virtual ASPOSECPP_SHARED_API SharedPtr<XmlNode> CreateNode(XmlNodeType type, const String& name, const String& namespaceURI);
402 virtual ASPOSECPP_SHARED_API SharedPtr<XmlNode> ReadNode(SharedPtr<XmlReader> reader);
420 virtual ASPOSECPP_SHARED_API void Load(String filename);
424 virtual ASPOSECPP_SHARED_API void Load(SharedPtr<IO::Stream> inStream);
428 virtual ASPOSECPP_SHARED_API void Load(SharedPtr<IO::TextReader> txtReader);
432 virtual ASPOSECPP_SHARED_API void Load(SharedPtr<XmlReader> reader);
436 virtual ASPOSECPP_SHARED_API void LoadXml(String xml);
441 virtual ASPOSECPP_SHARED_API void Save(String filename);
446 virtual ASPOSECPP_SHARED_API void Save(SharedPtr<IO::Stream> outStream);
451 virtual ASPOSECPP_SHARED_API void Save(SharedPtr<IO::TextWriter> writer);
456 virtual ASPOSECPP_SHARED_API void Save(SharedPtr<XmlWriter> w);
459 ASPOSECPP_SHARED_API void WriteTo(const SharedPtr<XmlWriter>& w) override;
462 ASPOSECPP_SHARED_API void WriteContentTo(const SharedPtr<XmlWriter>& xw) override;
467 ASPOSECPP_SHARED_API void Validate(Schema::ValidationEventHandler validationEventHandler);
475 ASPOSECPP_SHARED_API void Validate(Schema::ValidationEventHandler validationEventHandler, const SharedPtr<XmlNode>& nodeToValidate);
476
477protected:
478
480 bool fEntRefNodesPresent;
481 bool fCDataNodesPresent;
482 String strDocumentName;
483 String strDocumentFragmentName;
484 String strCommentName;
485 String strTextName;
486 String strCDataSectionName;
487 String strEntityName;
488 String strID;
489 String strXmlns;
490 String strXml;
491 String strSpace;
492 String strLang;
493 String strEmpty;
494 String strNonSignificantWhitespaceName;
495 String strSignificantWhitespaceName;
496 String strReservedXmlns;
497 String strReservedXml;
498 String baseURI;
499 bool bSetResolver;
500 SharedPtr<Object> objLock;
501 static SharedPtr<System::Xml::EmptyEnumerator> EmptyEnumerator;
502 static SharedPtr<Schema::IXmlSchemaInfo> NotKnownSchemaInfo;
503 static SharedPtr<Schema::IXmlSchemaInfo> ValidSchemaInfo;
504 static SharedPtr<Schema::IXmlSchemaInfo> InvalidSchemaInfo;
505
507 void set_DtdSchemaInfo(const SharedPtr<System::Xml::Schema::SchemaInfo>& value);
508 ASPOSECPP_SHARED_API SharedPtr<XmlNode> get_ParentNodeInternal() override;
509 virtual ASPOSECPP_SHARED_API SharedPtr<XmlDeclaration> get_Declaration();
510 SharedPtr<XmlElement> get_DocumentElementInternal();
511 ASPOSECPP_SHARED_API bool get_IsContainer() override;
512 ASPOSECPP_SHARED_API SharedPtr<XmlLinkedNode> get_LastNode() override;
513 ASPOSECPP_SHARED_API void set_LastNode(SharedPtr<XmlLinkedNode> value) override;
514 bool get_CanReportValidity();
515 bool get_HasSetResolver();
516 SharedPtr<XmlNamedNodeMap> get_Entities();
517 void set_Entities(const SharedPtr<XmlNamedNodeMap>& value);
518 bool get_IsLoading();
519 void set_IsLoading(bool value);
520 bool get_ActualLoadingStatus();
521 void set_ActualLoadingStatus(bool value);
522 SharedPtr<System::Text::Encoding> get_TextEncoding();
523 String get_Version();
524 String get_Encoding();
525 String get_Standalone();
526 ASPOSECPP_SHARED_API XPath::XPathNodeType get_XPNodeType() override;
527 bool get_HasEntityReferences();
528 SharedPtr<XmlAttribute> get_NamespaceXml();
530
533 ASPOSECPP_SHARED_API XmlDocument(const SharedPtr<XmlImplementation>& imp);
534
536
538 static void CheckName(const String& name);
539 SharedPtr<XmlName> AddXmlName(const String& prefix, const String& localName, const String& namespaceURI, const SharedPtr<Schema::IXmlSchemaInfo>& schemaInfo);
540 SharedPtr<XmlName> GetXmlName(const String& prefix, const String& localName, const String& namespaceURI, const SharedPtr<Schema::IXmlSchemaInfo>& schemaInfo);
541 SharedPtr<XmlName> AddAttrXmlName(const String& prefix, const String& localName, const String& namespaceURI, const SharedPtr<Schema::IXmlSchemaInfo>& schemaInfo);
542 bool AddIdInfo(const SharedPtr<XmlName>& eleName, const SharedPtr<XmlName>& attrName);
543 SharedPtr<XmlName> GetIDInfoByElement(const SharedPtr<XmlName>& eleName);
544 void AddElementWithId(const String& id, const SharedPtr<XmlElement>& elem);
545 void RemoveElementWithId(const String& id, const SharedPtr<XmlElement>& elem);
547 ASPOSECPP_SHARED_API bool IsValidChildType(XmlNodeType type) override;
548 ASPOSECPP_SHARED_API bool CanInsertBefore(SharedPtr<XmlNode> newChild, SharedPtr<XmlNode> refChild) override;
549 ASPOSECPP_SHARED_API bool CanInsertAfter(SharedPtr<XmlNode> newChild, SharedPtr<XmlNode> refChild) override;
550 void SetDefaultNamespace(const String& prefix, const String& localName, String& namespaceURI);
551 void AddDefaultAttributes(const SharedPtr<XmlElement>& elem);
553
558
560 static bool IsTextNode(XmlNodeType nt);
562
568 virtual ASPOSECPP_SHARED_API SharedPtr<XmlAttribute> CreateDefaultAttribute(const String& prefix, const String& localName, const String& namespaceURI);
569
571 XmlNodeType ConvertToNodeType(const String& nodeTypeString);
572 ASPOSECPP_SHARED_API SharedPtr<XmlNodeChangedEventArgs> GetEventArgs(SharedPtr<XmlNode> node, SharedPtr<XmlNode> oldParent, SharedPtr<XmlNode> newParent, String oldValue, String newValue, XmlNodeChangedAction action) override;
573 SharedPtr<XmlNodeChangedEventArgs> GetInsertEventArgsForLoad(const SharedPtr<XmlNode>& node, const SharedPtr<XmlNode>& newParent);
574 ASPOSECPP_SHARED_API void BeforeEvent(SharedPtr<XmlNodeChangedEventArgs> args) override;
575 ASPOSECPP_SHARED_API void AfterEvent(SharedPtr<XmlNodeChangedEventArgs> args) override;
576 SharedPtr<XmlAttribute> GetDefaultAttribute(const SharedPtr<XmlElement>& elem, const String& attrPrefix, const String& attrLocalname, const String& attrNamespaceURI);
577 SharedPtr<XmlEntity> GetEntityNode(const String& name);
578 void SetBaseURI(const String& inBaseURI);
579 ASPOSECPP_SHARED_API SharedPtr<XmlNode> AppendChildForLoad(const SharedPtr<XmlNode>& newChild, const SharedPtr<XmlDocument>& doc) override;
581
582 virtual ASPOSECPP_SHARED_API ~XmlDocument();
583
585 #ifdef ASPOSE_GET_SHARED_MEMBERS
586 ASPOSECPP_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
587 #endif
589
590private:
591
592 SharedPtr<XmlImplementation> _implementation;
593 SharedPtr<DomNameTable> _domNameTable;
594 SharedPtr<XmlLinkedNode> _lastChild;
600 bool _reportValidity;
601 bool _actualLoadingStatus;
602 bool _preserveWhitespace;
603 bool _isLoading;
605 SharedPtr<XmlAttribute> _namespaceXml;
606
607 SharedPtr<XmlName> GetIDInfoByElement_(const SharedPtr<XmlName>& eleName);
609 bool HasNodeTypeInPrevSiblings(XmlNodeType nt, const SharedPtr<XmlNode>& refNode);
610 bool HasNodeTypeInNextSiblings(XmlNodeType nt, const SharedPtr<XmlNode>& refNode);
611 SharedPtr<Schema::SchemaElementDecl> GetSchemaElementDecl(const SharedPtr<XmlElement>& elem);
612 SharedPtr<XmlAttribute> PrepareDefaultAttribute(const SharedPtr<Schema::SchemaAttDef>& attdef, const String& attrPrefix, const String& attrLocalname, String attrNamespaceURI);
613 SharedPtr<XmlNode> NormalizeText(SharedPtr<XmlNode> n);
614 SharedPtr<XmlNode> ImportNodeInternal(const SharedPtr<XmlNode>& node, bool deep);
615 void ImportAttributes(const SharedPtr<XmlNode>& fromElem, const SharedPtr<XmlNode>& toElem);
616 void ImportChildren(const SharedPtr<XmlNode>& fromNode, const SharedPtr<XmlNode>& toNode, bool deep);
618
619 static struct __StaticConstructor__ { __StaticConstructor__(); } s_constructor__;
620
621};
622
623} // namespace Xml
624} // namespace System
625
626
List forward declaration.
Definition: list.h:127
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Represents a weak reference, which references an object while still allowing that object to be delete...
Definition: weak_reference.h:107
Represents a collection of attributes that can be accessed by name or index.
Definition: xml_attribute_collection.h:35
Represents an attribute. Valid and default values for the attribute are defined in a document type de...
Definition: xml_attribute.h:50
Represents a CDATA section.
Definition: xml_cdata_section.h:36
Provides text manipulation methods that are used by several classes.
Definition: xml_character_data.h:36
Represents the content of an XML comment.
Definition: xml_comment.h:36
Represents a lightweight object that is useful for tree insert operations.
Definition: xml_document_fragment.h:36
Represents an XML document. You can use this class to load, validate, edit, add, and position XML in ...
Definition: xml_document.h:100
SharedPtr< XmlElement > CreateElement(const String &qualifiedName, const String &namespaceURI)
Creates an XmlElement with the qualified name and XmlNode::get_NamespaceURI.
void set_Schemas(const SharedPtr< Schema::XmlSchemaSet > &value)
Sets the XmlSchemaSet object associated with this XmlDocument.
void Validate(Schema::ValidationEventHandler validationEventHandler, const SharedPtr< XmlNode > &nodeToValidate)
Validates the XmlNode object specified against the XML Schema Definition Language (XSD) schemas in th...
virtual SharedPtr< XmlAttribute > CreateAttribute(const String &prefix, const String &localName, const String &namespaceURI)
Creates an XmlAttribute with the specified XmlNode::get_Prefix, XmlDocument::get_LocalName,...
virtual SharedPtr< XmlComment > CreateComment(const String &data)
Creates an XmlComment containing the specified data.
SharedPtr< XmlNameTable > get_NameTable()
Returns the XmlNameTable associated with this implementation.
String get_Name() override
Returns the qualified name of the node.
virtual void Load(SharedPtr< IO::Stream > inStream)
Loads the XML document from the specified stream.
SharedPtr< XmlNode > CloneNode(bool deep) override
Creates a duplicate of this node.
SharedPtr< XmlAttribute > CreateAttribute(const String &qualifiedName, const String &namespaceURI)
Creates an XmlAttribute with the specified qualified name and XmlNode::get_NamespaceURI.
virtual SharedPtr< XmlWhitespace > CreateWhitespace(const String &text)
Creates an XmlWhitespace node.
XmlDocument(const SharedPtr< XmlImplementation > &imp)
Initializes a new instance of the XmlDocument class with the specified XmlImplementation.
void Validate(Schema::ValidationEventHandler validationEventHandler)
Validates the XmlDocument against the XML Schema Definition Language (XSD) schemas contained in the X...
virtual SharedPtr< XmlDocumentType > CreateDocumentType(const String &name, const String &publicId, const String &systemId, const String &internalSubset)
Returns a new XmlDocumentType object.
virtual SharedPtr< XmlEntityReference > CreateEntityReference(const String &name)
Creates an XmlEntityReference with the specified name.
SharedPtr< XPath::XPathNavigator > CreateNavigator() override
Creates a new XPathNavigator object for navigating this document.
virtual SharedPtr< XmlText > CreateTextNode(const String &text)
Creates an XmlText with the specified text.
XmlNodeType get_NodeType() override
Returns the type of the current node.
virtual SharedPtr< XmlAttribute > CreateDefaultAttribute(const String &prefix, const String &localName, const String &namespaceURI)
Creates a default attribute with the specified prefix, local name and namespace URI.
XmlNodeChangedEventHandler NodeInserted
Occurs when a node belonging to this document has been inserted into another node.
Definition: xml_document.h:146
virtual void Save(SharedPtr< IO::TextWriter > writer)
Saves the XML document to the specified TextWriter.
virtual SharedPtr< XmlNode > ImportNode(SharedPtr< XmlNode > node, bool deep)
Imports a node from another document to the current document.
void WriteContentTo(const SharedPtr< XmlWriter > &xw) override
Saves all the children of the XmlDocument node to the specified XmlWriter.
XmlDocument(const SharedPtr< XmlNameTable > &nt)
Initializes a new instance of the XmlDocument class with the specified XmlNameTable.
virtual SharedPtr< XmlDocumentType > get_DocumentType()
Returns the node containing the DOCTYPE declaration.
XmlDocument()
Initializes a new instance of the XmlDocument class.
virtual SharedPtr< XmlNodeList > GetElementsByTagName(String localName, String namespaceURI)
Returns an XmlNodeList containing a list of all descendant elements that match the specified XmlDocum...
virtual void Save(SharedPtr< IO::Stream > outStream)
Saves the XML document to the specified stream.
virtual void Load(String filename)
Loads the XML document from the specified URL.
virtual SharedPtr< XmlProcessingInstruction > CreateProcessingInstruction(const String &target, const String &data)
Creates an XmlProcessingInstruction with the specified name and data.
SharedPtr< XmlAttribute > CreateAttribute(const String &name)
Creates an XmlAttribute with the specified name.
virtual SharedPtr< XmlNode > CreateNode(XmlNodeType type, const String &name, const String &namespaceURI)
Creates an XmlNode with the specified XmlNodeType, XmlDocument::get_Name, and XmlNode::get_NamespaceU...
XmlNodeChangedEventHandler NodeRemoving
Occurs when a node belonging to this document is about to be removed from the document.
Definition: xml_document.h:148
virtual void Load(SharedPtr< IO::TextReader > txtReader)
Loads the XML document from the specified TextReader.
String get_BaseURI() override
Returns the base URI of the current node.
virtual SharedPtr< XmlNode > ReadNode(SharedPtr< XmlReader > reader)
Creates an XmlNode object based on the information in the XmlReader. The reader must be positioned on...
void set_PreserveWhitespace(bool value)
Sets a value indicating whether to preserve white space in element content.
String get_InnerXml() override
Returns the markup representing the children of the current node.
bool get_IsReadOnly() override
Returns a value indicating whether the current node is read-only.
void set_InnerXml(String value) override
Sets the markup representing the children of the current node.
XmlNodeChangedEventHandler NodeInserting
Occurs when a node belonging to this document is about to be inserted into another node.
Definition: xml_document.h:144
virtual void set_XmlResolver(SharedPtr< System::Xml::XmlResolver > value)
Sets the XmlResolver to use for resolving external resources.
virtual SharedPtr< XPath::XPathNavigator > CreateNavigator(SharedPtr< XmlNode > node)
Creates an XPathNavigator object for navigating this document positioned on the XmlNode specified.
virtual SharedPtr< XmlSignificantWhitespace > CreateSignificantWhitespace(const String &text)
Creates an XmlSignificantWhitespace node.
SharedPtr< Schema::XmlSchemaSet > get_Schemas()
Returns the XmlSchemaSet object associated with this XmlDocument.
void set_InnerText(String value) override
Throws an InvalidOperationException in all cases.
virtual SharedPtr< XmlDeclaration > CreateXmlDeclaration(const String &version, const String &encoding, const String &standalone)
Creates an XmlDeclaration node with the specified values.
SharedPtr< XmlElement > get_DocumentElement()
Returns the root XmlElement for the document.
virtual SharedPtr< XmlElement > CreateElement(const String &prefix, const String &localName, const String &namespaceURI)
Creates an element with the specified XmlNode::get_Prefix, XmlDocument::get_LocalName,...
XmlNodeChangedEventHandler NodeChanging
Occurs when the XmlNode::get_Value of a node belonging to this document is about to be changed.
Definition: xml_document.h:152
virtual SharedPtr< XmlElement > GetElementById(String elementId)
Returns the XmlElement with the specified ID.
SharedPtr< Schema::IXmlSchemaInfo > get_SchemaInfo() override
Returns the Post-Schema-Validation-Infoset (PSVI) of the node.
SharedPtr< XmlElement > CreateElement(const String &name)
Creates an element with the specified name.
SharedPtr< XmlImplementation > get_Implementation()
Returns the XmlImplementation object for the current document.
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XmlDocument, CODEPORTING_ARGS(SharedPtr< XmlImplementation > imp))
String get_LocalName() override
Returns the local name of the node.
virtual SharedPtr< XmlCDataSection > CreateCDataSection(const String &data)
Creates an XmlCDataSection containing the specified data.
virtual SharedPtr< XmlDocumentFragment > CreateDocumentFragment()
Creates an XmlDocumentFragment.
XmlNodeChangedEventHandler NodeChanged
Occurs when the XmlNode::get_Value of a node belonging to this document has been changed.
Definition: xml_document.h:154
virtual SharedPtr< XmlNode > CreateNode(const String &nodeTypeString, const String &name, const String &namespaceURI)
Creates an XmlNode with the specified node type, XmlDocument::get_Name, and XmlNode::get_NamespaceURI...
virtual void Save(SharedPtr< XmlWriter > w)
Saves the XML document to the specified XmlWriter.
virtual SharedPtr< XmlNodeList > GetElementsByTagName(String name)
Returns an XmlNodeList containing a list of all descendant elements that match the specified name.
virtual void LoadXml(String xml)
Loads the XML document from the specified string.
XmlNodeChangedEventHandler NodeRemoved
Occurs when a node belonging to this document has been removed from its parent.
Definition: xml_document.h:150
SharedPtr< XmlDocument > get_OwnerDocument() override
Returns the XmlDocument to which the current node belongs.
bool get_PreserveWhitespace()
Returns a value indicating whether to preserve white space in element content.
void WriteTo(const SharedPtr< XmlWriter > &w) override
Saves the XmlDocument node to the specified XmlWriter.
virtual void Save(String filename)
Saves the XML document to the specified file. If the specified file exists, this method overwrites it...
virtual SharedPtr< XmlNode > CreateNode(XmlNodeType type, const String &prefix, const String &name, const String &namespaceURI)
Creates a XmlNode with the specified XmlNodeType, XmlNode::get_Prefix, XmlDocument::get_Name,...
virtual void Load(SharedPtr< XmlReader > reader)
Loads the XML document from the specified XmlReader.
Represents the document type declaration.
Definition: xml_document_type.h:37
Represents an element.
Definition: xml_element.h:51
Represents an entity reference node.
Definition: xml_entity_reference.h:32
Defines the context for a set of XmlDocument objects.
Definition: xml_implementation.h:29
Represents a collection of nodes that can be accessed by name or index.
Definition: xml_named_node_map.h:43
Represents a single node in the XML document.
Definition: xml_node.h:75
Represents a reader that provides fast, non-cached forward only access to XML data in an XmlNode.
Definition: xml_node_reader.h:49
Represents white space between markup in a mixed content node or white space within an xml:space='pre...
Definition: xml_significant_whitespace.h:37
Represents the text content of an element or attribute.
Definition: xml_text.h:37
Represents white space in element content.
Definition: xml_whitespace.h:36
class ASPOSECPP_SHARED_CLASS List
Definition: ienumerable.h:18
@ Text
Defines color adjustment information for text.
@ Stream
The type that supports reliable, two-way, connection-based byte streams without duplication of data a...
System::MulticastDelegate< void(SharedPtr< Object >, SharedPtr< ValidationEventArgs >)> ValidationEventHandler
Represents the callback method that will handle XML schema validation events and the ValidationEventA...
Definition: validation_event_handler.h:33
XPathNodeType
Defines the XPath node types that can be returned from the XPathNavigator class.
Definition: xpath_node_type.h:17
@ Schema
Validate according to XML Schema definition language (XSD) schemas, including inline XML Schemas....
@ Xml
Serialize according to the XML 1.0 rules.
System::MulticastDelegate< void(SharedPtr< Object >, SharedPtr< XmlNodeChangedEventArgs >)> XmlNodeChangedEventHandler
Represents the method that handles XmlDocument::NodeChanged, XmlDocument::NodeChanging,...
Definition: xml_node_changed_event_handler.h:25
XmlNodeChangedAction
Specifies the type of node change.
Definition: xml_node_changed_action.h:15
XmlNodeType
Specifies the type of node.
Definition: xml_node_type.h:15
@ XmlDeclaration
The XML declaration (for example, <?xml version='1.0'?>). The XmlNodeType::XmlDeclaration node must b...
Definition: db_command.h:9
class ASPOSECPP_SHARED_CLASS WeakReference
Represents a weak reference, which references an object while still allowing that object to be delete...
Definition: weak_reference.h:13