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
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
tagNamestringName 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
innerCDatastringContent for the CDATA section
WriteElement(string, string)
Writes an XML element with inner text content.
void WriteElement(string elementName, string inner)
Parameters
WriteNonPairTag(string)
Writes a self-closing XML tag without attributes.
void WriteNonPairTag(string tagName)
Parameters
tagNamestringName 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
tagNamestringName of the tag
attr1NamestringFirst attribute name
attr1ValuestringFirst attribute value
attr2NamestringSecond attribute name
attr2ValuestringSecond attribute value
WriteNonPairTagWithAttr(string, string, string)
Writes a self-closing XML tag with one attribute.
void WriteNonPairTagWithAttr(string tagName, string attrName, string attrValue)
Parameters
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
appendNullboolWhether to append null attribute values
tagNamestringName of the tag
attributesstring[]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
WriteNonPairTagWithAttrs(string, params string[])
Writes a self-closing XML tag with attributes from params array.
void WriteNonPairTagWithAttrs(string tag, params string[] args)
Parameters
WriteRaw(string)
Writes raw XML content directly to the output.
void WriteRaw(string rawContent)
Parameters
rawContentstringRaw XML content to write
WriteTag(string)
Writes an opening XML tag.
void WriteTag(string tagName)
Parameters
tagNamestringName 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
rssobjectRSS object for namespace configuration
nsmgrXmlNamespaceManagerXML namespace manager
namespaceUristringNamespace URI
prefixstringNamespace 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
tagNamestringName of the tag
nsmgrXmlNamespaceManagerXML namespace manager
argsstring[]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
tagNamestringName of the tag
attr1NamestringFirst attribute name
attr1ValuestringFirst attribute value
attr2NamestringSecond attribute name
attr2ValuestringSecond 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
tagstringName of the tag
attributeNamestringAttribute name
attributeValuestringAttribute value
skipEmptyOrNullboolWhether 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
WriteTagWithAttrs(string, params string[])
Writes a tag with attributes from params array.
void WriteTagWithAttrs(string tagName, params string[] attributes)
Parameters
WriteTagWithAttrsCheckNull(string, params string[])
Writes a tag with attributes, checking for null values.
void WriteTagWithAttrsCheckNull(string tagName, params string[] attributes)
Parameters
WriteXmlDeclaration()
Writes the standard XML declaration header.
void WriteXmlDeclaration()