AntaniXml


Schema

Namespace: AntaniXml

This is the public API of AntaniXml. It provides random generators for global elements defined in the given Xml Schema.

Constructors

ConstructorDescription
new(xmlSchemaSet)
Signature: xmlSchemaSet:XmlSchemaSet -> Schema

CompiledName: .ctor

Instance members

Instance memberDescription
Arbitrary(elementName)
Signature: elementName:XmlQualifiedName -> Arbitrary<XElement>

The object created embeds a random generator of xml elements and it is suitable for property based testing with FsCheck.

Parameters

  • elementName - Qualified name of the element for which to create an istance of Arbitrary. A corresponding global element definition is expected in the schema.
Arbitrary(elementName, customizations)
Signature: (elementName:XmlQualifiedName * customizations:CustomGenerators) -> Arbitrary<XElement>

The object created embeds a random generator of xml elements and it is suitable for property based testing with FsCheck.

Parameters

  • elementName - Qualified name of the element for which to create an istance of Arbitrary. A corresponding global element definition is expected in the schema.
  • customizations - Custom generators to override the default behavior.
Generator(elementName)
Signature: elementName:XmlQualifiedName -> IXmlElementGenerator

Creates a random generator of xml elements with the given qualified name. A corresponding global element definition is expected in the schema.

Parameters

  • elementName - Qualified name of the element for which to create an instance of IXmlElementGenerator.
GlobalElements
Signature: IEnumerable<XmlQualifiedName>

Global elements defined in the given schema.

CompiledName: get_GlobalElements

IsValid(element)
Signature: element:XElement -> bool

Helper method providing validation.

Validate(element)
Signature: element:XElement -> ValidationResult

Helper method providing validation.

Validate(element)
Signature: element:string -> ValidationResult

Helper method providing validation.

Static members

Static memberDescription
CreateFromText(schemaText)
Signature: schemaText:string -> Schema

Factory method to parse a schema from plain text.

CreateFromUri(schemaUri)
Signature: schemaUri:string -> Schema

Factory method to load a schema from its Uri.

Fork me on GitHub