XmlData ToString Method (Boolean)Delta Engine Documentation

Namespace: DeltaEngine.Content.Xml
Assembly: DeltaEngine.Content.Xml (in DeltaEngine.Content.Xml.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public string ToString(
	bool createWithDocumentHeader
)

Return Value

Type: String
Remarks

Tests: DeltaEngine.Content.Xml.Tests.XmlDataTests
Examples

2 unit tests call DeltaEngine.Content.Xml.XmlData.ToString(System.Boolean)
[Test]
public void ToStringProperty()
{
    var root = CreateShallowTestXmlData();
    Assert.AreEqual(@"<Child1 Attr1=""Value1"" Attr2=""Value2"">Tom</Child1>",
        root.Children[0].ToString());
}
[Test]
public void ToXmlString()
{
    XmlData root = CreateDeepTestXmlData();
    Assert.AreEqual(Root, root.ToString());
}
See Also