XML Writer
Functions to create XML.
This codeunit can help to write maintainable and easy to read code when creating XML data.
No need to declare a lot of XML variables, only this codeunit is needed.
Object Definition
Object Type | Codeunit |
Object ID | 70327083 |
Object Name | QWETB XML Writer |
Procedures
Name | Description |
---|---|
AddAttribute(Text; Text; Variant) | Adds an attribute to the last created element, with a given namespace. |
AddAttribute(Text; Variant) | Adds an attribute to the last created element. |
AddAttributeAbs(Integer; Text; Variant) | Adds an attribute to the element on the specified level. |
AddAttributeAbs(Integer; Text; Variant; Text) | Adds an attribute to the element on the specified level, with a given namespace. |
AddBase64ElementFromBlobAbsNS(Integer; Text; Codeunit "QWETB Temp Blob"; Text) | Adds a Base64 encoded element with an absolute number of levels, counted from the root element. |
AddBase64ElementFromBlobAbsNS(Integer; Text; Codeunit "Temp Blob"; Text) | Adds a Base64 encoded element with an absolute number of levels, counted from the root element. |
AddBase64ElementFromBlobRelNS(Integer; Text; Codeunit "QWETB Temp Blob"; Text) | Adds a Base64 encoded element. |
AddBase64ElementFromBlobRelNS(Integer; Text; Codeunit "Temp Blob"; Text) | Adds a Base64 encoded element. |
AddDocumentTypeElement(Text; Text; Text; Text) | Adds a document type element (<!DOCTYPE> ) before the Root Element. |
AddElementAbs(Integer; Text; Variant) | Adds an XmlElement with an absolute number of levels, counted from the root element. |
AddElementAbs(Integer; Text; Variant; Text) | Adds an XmlElement with an absolute number of levels, counted from the root element, with a given namespace. |
AddElementRel(Integer; Text; Variant) | Adds an XmlElement with a relative number of levels, counted from the last created element. |
AddElementRel(Integer; Text; Variant; Text) | Adds an XmlElement with a relative number of levels, counted from the last created element, with a given namespace. |
AddNamespaceDeclaration(Text; Text) | Adds a namespace declaration to the last created element. |
AddNamespaceDeclarationAbs(Integer; Text; Text) | Adds a namespace declaration to the element on the specified level. |
CreateDom(Text; Text; Text) | Creates the XML Document with the root element. |
CreateDom(Text; Text; Text; List of [Text]; List of [Text]) | Creates the XML Document with the root element and processing instructions. |
CreateDom(Text; Text; Text; Text) | Creates the XML Document with the root element and a default schema. |
CreateDom(Text; Text; Text; Text; List of [Text]; List of [Text]) | Creates the XML Document with the root element, a default schema and processing instructions. |
CreateDom(Text; Text; Text; Text; Text) | Creates the XML Document with the root element and a processing instruction. |
CreateDom(Text; Text; Text; Text; Text; Text) | Creates the XML Document with the root element, a default schema and a processing instruction. |
GetLevel(): Integer | Gets the current level (depth). |
GetXML(): Text | Gets the XML as text. |
ProcessingInstructionToList(List of [Text]; List of [Text]; Text; Text) | Adds the processing instruction code and value to the corresponding lists, that then can be used as parameters to the CreateDom functions. |
SaveToClientFile(Text) | Saves the XML to a file that is downloaded to the client. |
SaveToTempBlob(Codeunit "QWETB Temp Blob") | Saves the XML to a TempBlob codeunit. |
SaveToTempBlob(Codeunit "Temp Blob") | Saves the XML to a TempBlob codeunit. |
SaveToVariant(Variant) | Saves the XmlDocument object to a variant. |
SetNotBlankElement(Boolean) | Sets if elements with empty values and without child elements should be omitted. |
SetStandalone(Text) | Sets the value that should be used for the property standalone in the Xml Declaration. |
Deprecated Procedures
Name | Description |
---|---|
AddBase64ElementFromBlobAbsNS(Integer; Text; Record "QWETB tTempBlob" temporary; Text) | Adds a Base64 encoded element with an absolute number of levels, counted from the root element. |
AddBase64ElementFromBlobRelNS(Integer; Text; Record "QWETB tTempBlob" temporary; Text) | Adds a Base64 encoded element. |
SaveToTempBlob(Record "QWETB tTempBlob" temporary) | Saves the XML to a blob. |
This documentation is generated from Smart Toolbox v27.0