XmlSchema

XmlSchema class

An in-memory representation of an XML Schema, as specified in the World Wide Web Consortium (W3C) XML Schema Part 1: Structures and XML Schema Part 2: Datatypes.

class XmlSchema : public System::Xml::Schema::XmlSchemaObject

Methods

MethodDescription
void Compile(ValidationEventHandler)Compiles the XML SchemaObject Model (SOM) into schema information for validation. Used to check the syntactic and semantic structure of the programmatically built SOM. Semantic validation checking is performed during compilation.
void Compile(ValidationEventHandler, const SharedPtr<XmlResolver>&)Compiles the XML SchemaObject Model (SOM) into schema information for validation. Used to check the syntactic and semantic structure of the programmatically built SOM. Semantic validation checking is performed during compilation.
virtual bool Equals(ptr)Compares objects using C# Object.Equals semantics.
static std::enable_if<IsSmartPtr<T1>::value&&IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&)Compares reference type objects in C# style.
static std::enable_if<!IsSmartPtr<T1>::value&&!IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&)Compares value type objects in C# style.
static bool Equals(float const&, float const&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
static bool Equals(double const&, double const&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
virtual bool FastCast(const Details::FastRttiBase&, void **) constFor internal purposes only.
XmlSchemaForm get_AttributeFormDefault()Returns the form for attributes declared in the target namespace of the schema.
SharedPtr<XmlSchemaObjectTable> get_AttributeGroups()Returns the post-schema-compilation value of all the global attribute groups in the schema.
SharedPtr<XmlSchemaObjectTable> get_Attributes()Returns the post-schema-compilation value for all the attributes in the schema.
XmlSchemaDerivationMethod get_BlockDefault()Returns the blockDefault attribute which sets the default value of the block attribute on element and complex types in the targetNamespace of the schema.
XmlSchemaForm get_ElementFormDefault()Returns the form for elements declared in the target namespace of the schema.
SharedPtr<XmlSchemaObjectTable> get_Elements()Returns the post-schema-compilation value for all the elements in the schema.
XmlSchemaDerivationMethod get_FinalDefault()Returns the finalDefault attribute which sets the default value of the final attribute on elements and complex types in the target namespace of the schema.
SharedPtr<XmlSchemaObjectTable> get_Groups()Returns the post-schema-compilation value of all the groups in the schema.
String get_Id()Returns the string ID.
SharedPtr<XmlSchemaObjectCollection> get_Includes()Returns the collection of included and imported schemas.
bool get_IsCompiled()Indicates if the schema has been compiled.
SharedPtr<XmlSchemaObjectCollection> get_Items()Returns the collection of schema elements in the schema and is used to add new element types at the schema element level.
int32_t get_LineNumber()Returns the line number in the file to which the schema element refers.
int32_t get_LinePosition()Returns the line position in the file to which the schema element refers.
SharedPtr<System::Xml::Serialization::XmlSerializerNamespaces> get_Namespaces()Returns the XmlSerializerNamespaces to use with this schema object.
SharedPtr<XmlSchemaObjectTable> get_Notations()Returns the post-schema-compilation value for all notations in the schema.
SharedPtr<XmlSchemaObject> get_Parent()Returns the parent of this XmlSchemaObject.
SharedPtr<XmlSchemaObjectTable> get_SchemaTypes()Returns the post-schema-compilation value of all schema types in the schema.
String get_SourceUri()Returns the source location for the file that loaded the schema.
String get_TargetNamespace()Returns the Uniform Resource Identifier (URI) of the schema target namespace.
ArrayPtr<SharedPtr<XmlAttribute>> get_UnhandledAttributes()Returns the qualified attributes which do not belong to the schema target namespace.
String get_Version()Returns the version of the schema.
Detail::SmartPtrCounter * GetCounter()Gets reference counter data structure associated with the object.
virtual int32_t GetHashCode() constAnalog of C# Object.GetHashCode() method. Enables hashing of custom objects.
virtual const TypeInfo& GetType() constGets actual type of object. Analog of C# System.Object.GetType() call.
virtual bool Is(const TypeInfo&) constCheck if object represents an instance of type described by targetType. Analog of C# ‘is’ operator.
void Lock()Implements C# lock() statement locking. Call directly or use LockContext sentry object.
virtual ptr MemberwiseClone() constAnalog of C# Object.MemberwiseClone() method. Enables cloning custom types.
Object()Creates object. Initializes all internal data structures.
Object(Object const&)Copy constructor. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses.
Object& operator=(Object const&)Assignment operator. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses.
static SharedPtr<XmlSchema> Read(const SharedPtr<IO::TextReader>&, ValidationEventHandler)Reads an XML Schema from the supplied IO::TextReader.
static SharedPtr<XmlSchema> Read(const SharedPtr<IO::Stream>&, ValidationEventHandler)Reads an XML Schema from the supplied stream.
static SharedPtr<XmlSchema> Read(const SharedPtr<XmlReader>&, ValidationEventHandler)Reads an XML Schema from the supplied XmlReader.
static bool ReferenceEquals(ptr const&, ptr const&)Compares objects by reference.
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, T const&)Compares objects by reference.
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, std::nullptr_t)Reference-compares value type object with nullptr.
bool ReferenceEquals(String const&, std::nullptr_t)Specialization of Object::ReferenceEquals for case of string and nullptr.
bool ReferenceEquals(String const&, String const&)Specialization of Object::ReferenceEquals for case of strings.
int RemovedSharedRefs(int)Decreases shared reference count by specified value.
void set_AttributeFormDefault(XmlSchemaForm)Sets the form for attributes declared in the target namespace of the schema.
void set_BlockDefault(XmlSchemaDerivationMethod)Sets the blockDefault attribute which sets the default value of the block attribute on element and complex types in the targetNamespace of the schema.
void set_ElementFormDefault(XmlSchemaForm)Sets the form for elements declared in the target namespace of the schema.
void set_FinalDefault(XmlSchemaDerivationMethod)Sets the finalDefault attribute which sets the default value of the final attribute on elements and complex types in the target namespace of the schema.
void set_Id(const String&)Sets the string ID.
void set_LineNumber(int32_t)Sets the line number in the file to which the schema element refers.
void set_LinePosition(int32_t)Sets the line position in the file to which the schema element refers.
void set_Namespaces(const SharedPtr<System::Xml::Serialization::XmlSerializerNamespaces>&)Sets the XmlSerializerNamespaces to use with this schema object.
void set_Parent(const SharedPtr<XmlSchemaObject>&)Sets the parent of this XmlSchemaObject.
void set_SourceUri(const String&)Sets the source location for the file that loaded the schema.
void set_TargetNamespace(const String&)Sets the Uniform Resource Identifier (URI) of the schema target namespace.
void set_UnhandledAttributes(const ArrayPtr<SharedPtr<XmlAttribute>>&)Sets the qualified attributes which do not belong to the schema target namespace.
void set_Version(const String&)Sets the version of the schema.
virtual void SetTemplateWeakPtr(uint32_t)Set n’th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode.
int SharedCount() constGets current value of shared reference counter.
Object * SharedRefAdded()Increments shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
int SharedRefRemovedSafe()Decrements and returns shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
virtual String ToString() constAnalog of C# Object.ToString() method. Enables converting custom objects to string.
static const TypeInfo& Type()Implements C# typeof(System.Object) construct.
void Unlock()Implements C# lock() statement unlocking. Call directly or use LockContext sentry object.
Detail::SmartPtrCounter * WeakRefAdded()Increments weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
void WeakRefRemoved()Decrements weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
void Write(const SharedPtr<IO::Stream>&)Writes the XML Schema to the supplied data stream.
void Write(const SharedPtr<IO::Stream>&, const SharedPtr<XmlNamespaceManager>&)Writes the XML Schema to the supplied Stream using the XmlNamespaceManager specified.
void Write(const SharedPtr<IO::TextWriter>&)Writes the XML Schema to the supplied IO::TextWriter.
void Write(const SharedPtr<IO::TextWriter>&, const SharedPtr<XmlNamespaceManager>&)Writes the XML Schema to the supplied TextWriter.
void Write(const SharedPtr<XmlWriter>&)Writes the XML Schema to the supplied XmlWriter.
void Write(const SharedPtr<XmlWriter>&, const SharedPtr<XmlNamespaceManager>&)Writes the XML Schema to the supplied XmlWriter.
XmlSchema()Initializes a new instance of the XmlSchema class.
XmlSchemaObject()Initializes a new instance of the XmlSchemaObject class.
virtual ~Object()Destroys object. Frees all internal data structures.

Fields

FieldDescription
static InstanceNamespaceThe XML schema instance namespace. This field is constant.
static NamespaceThe XML schema namespace. This field is constant.

Typedefs

TypedefDescription
PtrAn alias for shared pointer to an instance of this class.

Remarks

Objects of this class should only be allocated using System::MakeObject() function. Never create instances of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

See Also