C# Class HandCoded.Xml.Builder

The Builder class extends Browser and adds methods that allow the underlying XmlDocument to be modified.
Inheritance: Browser
Mostrar archivo Open project: formicary/fpml-toolkit-csharp

Public Methods

Method Description
AppendCData ( string data ) : void

Creates a new XmlCDataSection node and appends it to the children of the context node.

AppendComment ( string comment ) : void

Creates a new XmlComment node and appends it to the children of the context node.

AppendDocument ( XmlDocument fragment ) : void

Appends a copy of the document fragment at the end of the element referenced by the context node.

AppendElement ( string name ) : XmlElement

Creates and appends a new XmlElement with the name indicated by the parameter name to the current context element.

AppendElement ( string uri, string name ) : XmlElement

Creates a new XmlElement with the given name and namespace URI and appends it as a child of context.

AppendElementAndText ( string name, string text ) : XmlElement

Creates a new leaf element containing the specified text string and appends it to the children of the context node.

AppendElementAndText ( string uri, string name, string text ) : XmlElement

Creates a new leaf element containing the specified text string and appends it to the children of the context node.

AppendText ( string text ) : void

Creates a new XmlText node and appends it to the children of the context node.

Builder ( XmlDocument document ) : System

Constructs a Builder attached to the root XmlElement of the given XmlDocument.

Builder ( XmlDocument document, XmlElement context ) : System

Constructs a Builder attached to the specified XmlElement of the given XmlDocument.

CloseElement ( ) : void

Makes the parent XmlElement of the context the new context for future operations.

SetAttribute ( string name, string value ) : void

Sets the value of the named attribute to the given value.

SetAttribute ( string uri, string name, string value ) : void

Sets the value of the named attribute in the indicated namespace, to the given value.

Method Details

AppendCData() public method

Creates a new XmlCDataSection node and appends it to the children of the context node.
public AppendCData ( string data ) : void
data string The value of the new node.
return void

AppendComment() public method

Creates a new XmlComment node and appends it to the children of the context node.
public AppendComment ( string comment ) : void
comment string The value of the new node.
return void

AppendDocument() public method

Appends a copy of the document fragment at the end of the element referenced by the context node.
public AppendDocument ( XmlDocument fragment ) : void
fragment System.Xml.XmlDocument The containing the fragment.
return void

AppendElement() public method

Creates and appends a new XmlElement with the name indicated by the parameter name to the current context element.
public AppendElement ( string name ) : XmlElement
name string The name of the new .
return System.Xml.XmlElement

AppendElement() public method

Creates a new XmlElement with the given name and namespace URI and appends it as a child of context.
public AppendElement ( string uri, string name ) : XmlElement
uri string The namespace URI or null if none.
name string The name of the new .
return System.Xml.XmlElement

AppendElementAndText() public method

Creates a new leaf element containing the specified text string and appends it to the children of the context node.
public AppendElementAndText ( string name, string text ) : XmlElement
name string The name of the new .
text string The value of the contained node.
return System.Xml.XmlElement

AppendElementAndText() public method

Creates a new leaf element containing the specified text string and appends it to the children of the context node.
public AppendElementAndText ( string uri, string name, string text ) : XmlElement
uri string The namespace URI of the new element or null.
name string The name of the new .
text string The value of the contained node.
return System.Xml.XmlElement

AppendText() public method

Creates a new XmlText node and appends it to the children of the context node.
public AppendText ( string text ) : void
text string The value of the new node.
return void

Builder() public method

Constructs a Builder attached to the root XmlElement of the given XmlDocument.
public Builder ( XmlDocument document ) : System
document System.Xml.XmlDocument The to attach to.
return System

Builder() public method

Constructs a Builder attached to the specified XmlElement of the given XmlDocument.
public Builder ( XmlDocument document, XmlElement context ) : System
document System.Xml.XmlDocument The to attach to.
context System.Xml.XmlElement The initial context .
return System

CloseElement() public method

Makes the parent XmlElement of the context the new context for future operations.
public CloseElement ( ) : void
return void

SetAttribute() public method

Sets the value of the named attribute to the given value.
public SetAttribute ( string name, string value ) : void
name string The name of the attribute to set.
value string The new value of the attribute.
return void

SetAttribute() public method

Sets the value of the named attribute in the indicated namespace, to the given value.
public SetAttribute ( string uri, string name, string value ) : void
uri string The namespace URI of the attribute.
name string The name of the attribute to set.
value string The new value of the attribute.
return void