Click or drag to resize

XmlSchemaManager Class

Class supports the creation of schema conform xml documents for a given schema. It can be used to create elements with all required attributes and child elements and default values associated. Insertion of new child elements for a given parent at a schema is supported, guaranteeing schema conform sequences and occurrences of all children.
Inheritance Hierarchy
SystemObject
  Aml.Engine.SchemaXmlSchemaManager
    Aml.Engine.SchemaAMLSchemaManager

Namespace: Aml.Engine.Schema
Assembly: Aml.Engine (in Aml.Engine.dll) Version: 3.2
Syntax
public abstract class XmlSchemaManager

The XmlSchemaManager type exposes the following members.

Properties
 NameDescription
Public propertyNamespace Gets the Schema Namespace
Public propertySchemaLocation Gets the SchemaLocation string
Public propertySchemaSet Gets the actual XSD schema set
Top
Methods
 NameDescription
Public methodStatic memberAcceptsAny Determines if the schema element accepts values of any type.
Public methodAddNew Creates a new Xml-Element with the provided content and inserts it to the provided parent according to this schema instance.
Public methodAddNewAfterSelf Creates a new Xml-Element with the provided content and inserts it behind the provided sibling according to this schema instance.
Public methodAttributeNames Gets the Attribute names of the specified child element of the specified parent element.
Public methodAttributes Gets the Schema Elements for all attributes of the specified child element of the specified parent element, if the defined parent child relation exists in the xml schema. If required is set to true, only the required attributes are returned. The default behaviour is, that all attributes - optional and required attributes - are returned.
Public methodAttributeValueRestrictions Gets the List of Attribute value restrictions for the attribute with the defined name. The Attribute should be an attribute of a child defined by the given name, which exists in the defined parent child relation defined by the parent name.
Public methodStatic memberAttributeValueType(XmlSchemaAttribute) Gets the type code for the schema attribute.
Public methodAttributeValueType(XName, XName, String) Gets the Attribute value types for the attribute with the defined name of a child element which belongs to the given parent. If XmlTypeCode.Item is returned, the value type is equal to the schema internal any type.
Public methodCanAddNew Determines, if a child with the specified name can be added to the parent node. The method checks the specified minimal and maximal occurrences, defined for this relation in the xml schema.
Public methodChildElementNames Gets the Names for all elements, which can be added to the child which is defined with the name of it's parent and the name of itself.
Public methodChildElements Gets the SchemaDefinition for all elements, which can be added to the child which is defined with the name of it's parent and the name of itself.
Public methodChoices Gets the names of all alternative child nodes, which can be added to a parent node with the given name. The specified child itself is included. Choices only exists, if IsChoice(String, String) returns true for the defined child name.
Public methodCreateAttribute Creates the attribute with the provided name if this attribute is defined in this schema instance.
Public methodCreateElement Creates a new node with the specified child name in the given xmlDocument. The node is created with all required attributes and elements but is not inserted in the document tree at this point. Use Insert(XElement, XElement) for insertion or InsertNew(XElement, XName, Boolean) for a combined creation and insertion.
Public methodGetAnnotation(XmlSchemaAnnotated) Gets the annotation from the annotated schema element.
Public methodGetAnnotation(XmlSchemaAttribute) Gets the annotation from the schema attribute element.
Public methodGetAnnotation(XmlSchemaElement) Gets the annotation from the schema element.
Public methodHasChoiceOfElements Determines, whether the schema element representing the parent - child relation has a content, which is restricted to a choice of elements. If onlyOne is set to true, there can not be more than one element added to the element
Public methodHasSequenceOfSimpleElements Determines, if the schema defines a sequence of simple elements for the provided parent child combination.
Public methodInsert Inserts an existing child node into the collection of child nodes of the specified parent node.
Public methodInsertNew Creates a new node with the defined child name and inserts the newly created child into the child nodes collection of the specified parent. Optional, it can be specified, if the new node should get all attributes, which are defined in the schema, or only those attributes which are required (default behaviour). The Method can be overridden by specific schema managers, to add additional properties to the created node, which can not be derived directly from the schema.
Public methodIsChoice Determines, whether the occurrence of a child with that name under a parent with that name is part of a choice (means that there are other exclusive alternatives for child nodes). If not, the child is defined in a sequence. For choices, the names of alternatives are available with Choices(XName, XName).
Public methodStatic memberIsChoiceForOneElement Determines if the schema defines a choice of only one element for the provided schema element.
Public methodIsDefinedAttribute Determines, if the Attribute with the provided is defined for this element
Public methodIsParent Determines, if the parent is allowed to contain a child with the provided name according to this schema instance.
Public methodIsRequiredAttribute Determines, if the Attribute with the provided name is a required attribute when added to the parent child combination.
Public methodMaxOccurence Returned the maximal occurrence for child nodes with the specified name under a parent node with the specified name. For unbounded occurrences, the returned value is MaxValue. If the occurrence is 0, the existence of a child with that name under a parent with that name is not allowed.
Public methodMinOccurence The minimal occurrence for child node with the defined name under a parent node with the defined name. If 0 is returned, the existence of a child node with that node is optional. If 1 is returned, the existence is mandatory.
Public methodSchemaElement Gets the schema information for the provided parent child combination.
Public methodSiblingBefore This method is a utility method for insert operations. The method will return the node which should be used as the sibling before a newly added child with the defined name. The Insertion has to be done after the returned node or prepended to the parent itself, if no node null is returned.
Public methodValidate Validates a document if it is conform to this schema instance.
Public methodValueType Returns the type code for a value that may be associated with the defined child.
Top
See Also