XmlLiteral

Description

sealed class Tinman.Core.Xml.XmlLiteral

Derived from

XmlNode abstract

Represents a string literal in an XML document:

"Hello   World!"
'Hello   World!'

Public / Constructors

For

4 overloads


[Pure]
public static method For1 → (1)

value in : bool

The literal value.

returns → XmlLiteral

The XmlLiteral instance.

Returns a XmlLiteral instance for the given value in.

See also

Format.ThisBool


[Pure]
public static method For2 → (2)

value in : int64

The literal value.

flags opt : FormatFlags = FormatFlags.Default

The format flags to use.

returns → XmlLiteral

The XmlLiteral instance.

Returns a XmlLiteral instance for the given value in.

See also

Format.ThisInt


[Pure]
public static method For3 → (2)

value in : float64

The literal value.

flags opt : FormatFlags = FormatFlags.Default

The format flags to use.

returns → XmlLiteral

The XmlLiteral instance.

Returns a XmlLiteral instance for the given value in.

See also

Format.ThisNum


[Pure]
public static method For4 → (1)

value in : string

[not-null]
The literal value.

returns → XmlLiteral

The XmlLiteral instance.

Returns a XmlLiteral instance for the given value in.

From​Source


public static method FromSource → (1)

xml in : string

[not-empty]
The XML literal to parse.

returns → XmlLiteral

The parsed XmlLiteral.

Parses the given XML literal and returns an XmlLiteral object for it.

ValidatingException

If xml in is malformed.

Xml​Literal

2 overloads


public constructor XmlLiteral1 → (1)

capacity opt : int32 = 1

The initial capacity of Content.

Creates a new instance of XmlLiteral.


public constructor XmlLiteral2 → (1)

content in : IBagConst<XmlNode>

The value node list or null for an empty list. See Content. All non-value nodes will be ignored (see XmlNode.IsLiteralContent).

Creates a new instance of XmlLiteral.

Public / Methods

Add


public method Add → (1)

node in : XmlNode

[not-null]
The node to add. May be one of the following (will be ignored otherwise): XmlChar, XmlEntity, XmlText.

returns → XmlLiteral

this

Adds the given node to this string literal.

Public / Attributes

Content


[Constant]
public attribute Content → (get)

value : IVectorConst<XmlNode>

[not-null]
The list of XML nodes that represent the string literal.

Returns the content nodes of this literal, see XmlNode.IsLiteralContent.