XmlSnippet ClassDelta Engine Documentation
Creates XmlData from a string View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Content.Xml XmlSnippet

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

public class XmlSnippet

The XmlSnippet type exposes the following members.

Constructors

  NameDescription
Public methodXmlSnippet
Initializes a new instance of the XmlSnippet class
Top
Properties

  NameDescription
Public propertyRoot
Top
Remarks

Tests: DeltaEngine.Content.Xml.Tests.XmlSnippetTests
Examples

2 unit tests call DeltaEngine.Content.Xml.XmlSnippet
[Test]
public void ToAndFromXmlSnippetLeavesTextUnchanged()
{
    var snippet = CreateTestXmlData().ToString();
    var xmlSnippet = new XmlSnippet(snippet);
    Assert.AreEqual(snippet, xmlSnippet.Root.ToString());
}
[Test]
public void IgnoresLeadingJunk()
{
    var snippet = CreateTestXmlData().ToString();
    var xmlSnippet = new XmlSnippet("blahblah" + snippet);
    Assert.AreEqual(snippet, xmlSnippet.Root.ToString());
}
See Also