Table of Contents

Codeunit "Xml Validation"

ID 6240
Namespace: System.Xml

Provides helper functions for xml validation against a schema.

Properties

Name Value
Access Public
InherentEntitlements X
InherentPermissions X

Methods

TryValidateAgainstSchema

Performs validation of an XML from a string against a schema from a string.

[TryFunction]
procedure TryValidateAgainstSchema(Xml: Text, XmlSchema: Text, Namespace: Text): Boolean

Parameters

Name Type Description
Xml Text

Xml string to validate.

XmlSchema Text

Xml schema string to validate against.

Namespace Text

Namespace of the xml schema.

Returns

Type Description
Boolean

TryValidateAgainstSchema

Performs validation of a XmlDocument against a schema in a XmlDocument.

[TryFunction]
procedure TryValidateAgainstSchema(XmlDoc: XmlDocument, XmlSchemaDoc: XmlDocument, Namespace: Text): Boolean

Parameters

Name Type Description
XmlDoc XmlDocument

Xml document to validate.

XmlSchemaDoc XmlDocument

Xml document with the schema to validate against.

Namespace Text

Namespace of the xml schema.

Returns

Type Description
Boolean

TryValidateAgainstSchema

Performs validation of a XmlDocument against a schema in a stream.

[TryFunction]
procedure TryValidateAgainstSchema(XmlDocInStream: InStream, XmlSchemaInStream: InStream, Namespace: Text): Boolean

Parameters

Name Type Description
XmlDocInStream InStream

InStream holding the xml document to validate.

XmlSchemaInStream InStream

InStream holding the schema to validate against.

Namespace Text

Namespace of the xml schema.

Returns

Type Description
Boolean

TrySetValidatedDocument

Sets validated document from a string.

[TryFunction]
procedure TrySetValidatedDocument(Xml: Text): Boolean

Parameters

Name Type Description
Xml Text

Xml string to validate.

Returns

Type Description
Boolean

TrySetValidatedDocument

Sets validated document in a XmlDocument.

[TryFunction]
procedure TrySetValidatedDocument(XmlDoc: XmlDocument): Boolean

Parameters

Name Type Description
XmlDoc XmlDocument

Xml document to validate.

Returns

Type Description
Boolean

TrySetValidatedDocument

Sets validated document from a stream.

[TryFunction]
procedure TrySetValidatedDocument(XmlDocInStream: InStream): Boolean

Parameters

Name Type Description
XmlDocInStream InStream

InStream holding the XML document to validate.

Returns

Type Description
Boolean

TryAddValidationSchema

Adds validation schema to validated document from a string.

[TryFunction]
procedure TryAddValidationSchema(Xml: Text, Namespace: Text): Boolean

Parameters

Name Type Description
Xml Text
Namespace Text

Namespace of the XML schema.

Returns

Type Description
Boolean

TryAddValidationSchema

Adds validation schema to validated document in a XmlDocument.

[TryFunction]
procedure TryAddValidationSchema(XmlSchemaDoc: XmlDocument, Namespace: Text): Boolean

Parameters

Name Type Description
XmlSchemaDoc XmlDocument

Xml document with the schema to validate against.

Namespace Text

Namespace of the XML schema.

Returns

Type Description
Boolean

TryAddValidationSchema

Adds validation schema to validated document from a stream.

[TryFunction]
procedure TryAddValidationSchema(XmlSchemaInStream: InStream, Namespace: Text): Boolean

Parameters

Name Type Description
XmlSchemaInStream InStream

InStream holding the XSD schema to validate against.

Namespace Text

Namespace of the XML schema.

Returns

Type Description
Boolean

TryValidateAgainstSchema

Performs validation of a XML document against one or multiple XSD schemas.

[TryFunction]
procedure TryValidateAgainstSchema(): Boolean

Returns

Type Description
Boolean

See also