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>
19template <
typename,
typename>
class Dictionary;
20template <
typename>
class List;
36class DocumentSchemaValidator;
37class DocumentXmlWriter;
38class DocumentXPathNavigator;
45class SchemaElementDecl;
50class XmlAttributeCollection;
52class XmlCharacterData;
56class XmlDocumentFragment;
60class XmlEntityReference;
61class XmlImplementation;
69class XmlNodeChangedEventArgs;
72class XmlNodeReaderNavigator;
73class XmlProcessingInstruction;
76class XmlSignificantWhitespace;
79class XmlUnspecifiedAttribute;
104 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
105 ASPOSECPP_SHARED_RTTI_INFO_DECL();
114 friend class DocumentSchemaValidator;
115 friend class DocumentXmlWriter;
116 friend class DocumentXPathNavigator;
123 friend class XmlChildNodes;
130 friend class XmlLoader;
131 friend class XmlNameEx;
134 friend class XmlNodeReaderNavigator;
137 friend class XmlUnspecifiedAttribute;
480 bool fEntRefNodesPresent;
481 bool fCDataNodesPresent;
483 String strDocumentFragmentName;
486 String strCDataSectionName;
494 String strNonSignificantWhitespaceName;
495 String strSignificantWhitespaceName;
511 ASPOSECPP_SHARED_API
bool get_IsContainer()
override;
514 bool get_CanReportValidity();
515 bool get_HasSetResolver();
518 bool get_IsLoading();
519 void set_IsLoading(
bool value);
520 bool get_ActualLoadingStatus();
521 void set_ActualLoadingStatus(
bool value);
527 bool get_HasEntityReferences();
538 static void CheckName(
const String& name);
547 ASPOSECPP_SHARED_API
bool IsValidChildType(
XmlNodeType type)
override;
550 void SetDefaultNamespace(
const String& prefix,
const String& localName,
String& namespaceURI);
578 void SetBaseURI(
const String& inBaseURI);
585 #ifdef ASPOSE_GET_SHARED_MEMBERS
586 ASPOSECPP_SHARED_API
void GetSharedMembers(System::Object::shared_members_type& result)
const override;
600 bool _reportValidity;
601 bool _actualLoadingStatus;
602 bool _preserveWhitespace;
619 static struct __StaticConstructor__ { __StaticConstructor__(); } s_constructor__;
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 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