XmlFileTests LoadXmlFromStream Method Delta Engine Documentation

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

public void LoadXmlFromStream()
Examples

[Test]
public void LoadXmlFromStream()
{
    var memoryStream = new MemoryStream();
    var writer = new BinaryWriter(memoryStream);
    writer.Write(new XmlData("MyData").ToString());
    memoryStream.Seek(0, SeekOrigin.Begin);
    var file = new XmlFile(memoryStream);
    Assert.AreEqual("MyData", file.Root.Name);
}
See Also