Table of Contents

Interface IXmlGeneratorDC

Namespace
SunamoDevCode._public.SunamoInterfaces.Interfaces
Assembly
SunamoDevCode.dll

Interface for generating XML content with various tag and attribute writing capabilities.

public interface IXmlGeneratorDC
Extension Methods

Methods

AppendLine()

Appends a new line to the XML output.

void AppendLine()

EndComment()

Writes the end of an XML comment block.

void EndComment()

Insert(int, string)

Inserts text at the specified index position.

void Insert(int index, string text)

Parameters

index int

Position to insert at

text string

Text to insert

Length()

Returns the current length of the XML output.

int Length()

Returns

int

Length of the output

StartComment()

Writes the start of an XML comment block.

void StartComment()

TerminateTag(string)

Writes a closing tag for the specified element.

void TerminateTag(string tagName)

Parameters

tagName string

Name of the tag to close

ToString()

Returns the current XML output as a string.

string ToString()

Returns

string

String representation of the XML output

WriteCData(string)

Writes a CDATA section with the specified content.

void WriteCData(string innerCData)

Parameters

innerCData string

Content for the CDATA section

WriteElement(string, string)

Writes an XML element with inner text content.

void WriteElement(string elementName, string inner)

Parameters

elementName string

Name of the element

inner string

Inner text content

WriteNonPairTag(string)

Writes a self-closing XML tag without attributes.

void WriteNonPairTag(string tagName)

Parameters

tagName string

Name of the tag

WriteNonPairTagWith2Attrs(string, string, string, string, string)

Writes a self-closing XML tag with two attributes.

void WriteNonPairTagWith2Attrs(string tagName, string attr1Name, string attr1Value, string attr2Name, string attr2Value)

Parameters

tagName string

Name of the tag

attr1Name string

First attribute name

attr1Value string

First attribute value

attr2Name string

Second attribute name

attr2Value string

Second attribute value

WriteNonPairTagWithAttr(string, string, string)

Writes a self-closing XML tag with one attribute.

void WriteNonPairTagWithAttr(string tagName, string attrName, string attrValue)

Parameters

tagName string

Name of the tag

attrName string

Attribute name

attrValue string

Attribute value

WriteNonPairTagWithAttrs(bool, string, params string[])

Writes a self-closing XML tag with multiple attributes, optionally appending null values.

void WriteNonPairTagWithAttrs(bool appendNull, string tagName, params string[] attributes)

Parameters

appendNull bool

Whether to append null attribute values

tagName string

Name of the tag

attributes string[]

Attribute name-value pairs

WriteNonPairTagWithAttrs(string, List<string>)

Writes a self-closing XML tag with attributes from a list.

void WriteNonPairTagWithAttrs(string tag, List<string> args)

Parameters

tag string

Name of the tag

args List<string>

List of attribute name-value pairs

WriteNonPairTagWithAttrs(string, params string[])

Writes a self-closing XML tag with attributes from params array.

void WriteNonPairTagWithAttrs(string tag, params string[] args)

Parameters

tag string

Name of the tag

args string[]

Attribute name-value pairs

WriteRaw(string)

Writes raw XML content directly to the output.

void WriteRaw(string rawContent)

Parameters

rawContent string

Raw XML content to write

WriteTag(string)

Writes an opening XML tag.

void WriteTag(string tagName)

Parameters

tagName string

Name of the tag

WriteTagNamespaceManager(object, XmlNamespaceManager, string, string)

Writes a tag with namespace manager configuration using an RSS object.

void WriteTagNamespaceManager(object rss, XmlNamespaceManager nsmgr, string namespaceUri, string prefix)

Parameters

rss object

RSS object for namespace configuration

nsmgr XmlNamespaceManager

XML namespace manager

namespaceUri string

Namespace URI

prefix string

Namespace prefix

WriteTagNamespaceManager(string, XmlNamespaceManager, params string[])

Writes a tag with namespace manager and attribute arguments.

void WriteTagNamespaceManager(string tagName, XmlNamespaceManager nsmgr, params string[] args)

Parameters

tagName string

Name of the tag

nsmgr XmlNamespaceManager

XML namespace manager

args string[]

Additional arguments

WriteTagWith2Attrs(string, string, string, string, string)

Writes a tag with two attributes.

void WriteTagWith2Attrs(string tagName, string attr1Name, string attr1Value, string attr2Name, string attr2Value)

Parameters

tagName string

Name of the tag

attr1Name string

First attribute name

attr1Value string

First attribute value

attr2Name string

Second attribute name

attr2Value string

Second attribute value

WriteTagWithAttr(string, string, string, bool)

Writes a tag with one attribute, optionally skipping empty or null values.

void WriteTagWithAttr(string tag, string attributeName, string attributeValue, bool skipEmptyOrNull = false)

Parameters

tag string

Name of the tag

attributeName string

Attribute name

attributeValue string

Attribute value

skipEmptyOrNull bool

Whether to skip writing if value is empty or null

WriteTagWithAttrs(string, List<string>)

Writes a tag with attributes from a list.

void WriteTagWithAttrs(string tagName, List<string> attributes)

Parameters

tagName string

Name of the tag

attributes List<string>

List of attribute name-value pairs

WriteTagWithAttrs(string, params string[])

Writes a tag with attributes from params array.

void WriteTagWithAttrs(string tagName, params string[] attributes)

Parameters

tagName string

Name of the tag

attributes string[]

Attribute name-value pairs

WriteTagWithAttrsCheckNull(string, params string[])

Writes a tag with attributes, checking for null values.

void WriteTagWithAttrsCheckNull(string tagName, params string[] attributes)

Parameters

tagName string

Name of the tag

attributes string[]

Attribute name-value pairs

WriteXmlDeclaration()

Writes the standard XML declaration header.

void WriteXmlDeclaration()