Table of Contents

Codeunit XmlWriter

ID 1483
Namespace: System.Xml

Provides helper functions for System.Xml.XmlWriter

Properties

Name Value
Access Public
InherentEntitlements X
InherentPermissions X

Methods

WriteStartDocument

Initializes the XmlWriter and creates the XmlWriter Document

procedure WriteStartDocument()

WriteProcessingInstruction

Writes the Processing Instruction.

procedure WriteProcessingInstruction(Name: Text, Text: Text)

Parameters

Name Type Description
Name Text

The name of the processing instruction.

Text Text

The text to include in the processing instruction.

Remarks

This function reinitializes the XML Writer.

WriteStartElement

Writes the specified start tag.

procedure WriteStartElement(LocalName: Text)

Parameters

Name Type Description
LocalName Text

The local name of the element.

WriteStartElement

Writes the specified start tag and associates it with the given namespace and prefix.

procedure WriteStartElement(Prefix: Text, LocalName: Text, NameSpace: Text)

Parameters

Name Type Description
Prefix Text

The namespace prefix of the element.

LocalName Text

The local name of the element.

NameSpace Text

The namespace URI to associate with the element. If this namespace is already in scope and has an associated prefix, the writer automatically writes that prefix also.

WriteElementString

Writes an element with the specified local name and value.

procedure WriteElementString(LocalName: Text, ElementValue: Text)

Parameters

Name Type Description
LocalName Text

The local name of the element.

ElementValue Text

The value of the element.

WriteElementString

Writes an element with the specified local name, value and namespace.

procedure WriteElementString(LocalName: Text, ElementValue: Text, Namespace: Text)

Parameters

Name Type Description
LocalName Text

The local name of the element.

ElementValue Text

The value of the element.

Namespace Text

The namespace URI of the element.

WriteElementString

Writes an element with the specified local name, value, namespace and prefix.

procedure WriteElementString(LocalName: Text, ElementValue: Text, Namespace: Text, Prefix: Text)

Parameters

Name Type Description
LocalName Text

The local name of the element.

ElementValue Text

The value of the element.

Namespace Text

The namespace URI of the element.

Prefix Text

The prefix of the element.

WriteString

Writes the given text content.

procedure WriteString(ElementText: Text)

Parameters

Name Type Description
ElementText Text

Text to write.

WriteEndElement

Closes one element and pops the corresponding namespace scope.

procedure WriteEndElement()

WriteAttributeString

Writes an attribute with the specified local name, namespace URI, and value.

procedure WriteAttributeString(Prefix: Text, LocalName: Text, Namespace: Text, ElementValue: Text)

Parameters

Name Type Description
Prefix Text

The namespace prefix of the attribute.

LocalName Text

The local name of the attribute.

Namespace Text

The namespace URI of the attribute.

ElementValue Text

The value of the attribute.

WriteAttributeString

Writes out the attribute with the specified local name and value.

procedure WriteAttributeString(LocalName: Text, ElementValue: Text)

Parameters

Name Type Description
LocalName Text

The local name of the attribute.

ElementValue Text

The value of the attribute.

WriteComment

Writes out a comment containing the specified text.

procedure WriteComment(Comment: Text)

Parameters

Name Type Description
Comment Text

Text to place inside the comment.

WriteEndDocument

Closes any open elements or attributes and puts the writer back in the Start state.

procedure WriteEndDocument()

ToBigText

Writes the text within Xml Writer to the BigText variable.

procedure ToBigText(var XmlBigText: BigText)

Parameters

Name Type Description
XmlBigText BigText

The BigText the Xml Writer has to be write to.

See also