Simplified Xml handling
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Content.Xml XmlData
Namespace: DeltaEngine.Content.Xml
Assembly: DeltaEngine.Content.Xml (in DeltaEngine.Content.Xml.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The XmlData type exposes the following members.
Constructors
Name | Description | |
---|---|---|
XmlData | Initializes a new instance of the XmlData class | |
XmlData(String) | Initializes a new instance of the XmlData class |
Methods
Extension Methods
Name | Description | |
---|---|---|
AddMetaDataEntry | (Defined by XmlMetaDataExtensions.) |
Properties
Name | Description | |
---|---|---|
Attributes | ||
Children | ||
Name | ||
Parent | ||
Value |
Remarks
Examples
[Test] public void Constructor() { var root = new XmlData("name"); Assert.AreEqual("name", root.Name); Assert.AreEqual(0, root.Children.Count); Assert.AreEqual(0, root.Attributes.Count); }
[Test] public void InvalidName() { Assert.Throws<XmlData.InvalidXmlNameException>(() => new XmlData(null)); Assert.Throws<XmlData.InvalidXmlNameException>(() => new XmlData("Hello World")); }
[Test] public void GetChild() { var root = new XmlData("root"); root.AddChild(new XmlData("child1")); var child2 = new XmlData("child2"); root.AddChild(child2); Assert.AreEqual(child2, root.GetChild("child2")); }
See Also