Class XmlFile¶
Namespace: Apogee.Content.Xml
Assembly: Apogee.Content.dll
Reads an XML file of the game, whichever form it is in: text, as it is written and edited, or cooked (
public static class XmlFile
Inheritance¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods¶
Read(VirtualFileSystem, string)¶
The document at path.
public static XmlNode Read(VirtualFileSystem files, string path)
Parameters¶
files VirtualFileSystem
path string
Returns¶
Exceptions¶
No source has the file.
The file is text and is not well-formed XML.
The file is cooked and damaged, or cooked by a newer engine.
Read(ReadOnlySpan<byte>, string)¶
The document in bytes: cooked when it starts with the magic, UTF-8 text (with or without a byte order mark) otherwise.
public static XmlNode Read(ReadOnlySpan<byte> bytes, string origin)
Parameters¶
bytes ReadOnlySpan<byte>
The file's bytes.
origin string
The path to name in errors, and what
Returns¶
Exceptions¶
The bytes are text and not well-formed XML.
The bytes are cooked and damaged, or cooked by a newer engine.