2012-10-22 17:18:04 +00:00
|
|
|
|
#region Using Statements
|
|
|
|
|
using System;
|
2012-09-28 20:57:30 +00:00
|
|
|
|
using System.Collections.Generic;
|
2012-10-02 20:05:12 +00:00
|
|
|
|
using System.Diagnostics;
|
2012-09-28 20:57:30 +00:00
|
|
|
|
using System.IO;
|
2012-10-02 20:05:12 +00:00
|
|
|
|
using System.Linq;
|
2012-09-29 16:17:59 +00:00
|
|
|
|
using System.Reflection;
|
2012-09-28 20:57:30 +00:00
|
|
|
|
using System.Xml;
|
2012-10-02 21:28:13 +00:00
|
|
|
|
using System.Xml.Linq;
|
2012-09-28 20:57:30 +00:00
|
|
|
|
using ANX.Framework.NonXNA.Development;
|
2012-09-29 16:17:59 +00:00
|
|
|
|
using ANX.Framework.NonXNA.Reflection;
|
2015-03-29 18:16:03 +02:00
|
|
|
|
using ANX.Framework.Content.Pipeline.Serialization.Intermediate;
|
2015-04-26 19:47:26 +02:00
|
|
|
|
using System.ComponentModel;
|
2012-10-22 17:18:04 +00:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
// This file is part of the ANX.Framework created by the
|
|
|
|
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
|
|
|
|
// For details see: http://anxframework.codeplex.com/license
|
2012-09-28 20:57:30 +00:00
|
|
|
|
|
|
|
|
|
namespace ANX.Framework.Content.Pipeline.Importer
|
|
|
|
|
{
|
2015-04-26 19:47:26 +02:00
|
|
|
|
[ContentImporter(new[] { ".xml" }, Category="XML Files")]
|
2015-03-29 18:16:03 +02:00
|
|
|
|
[Developer("KorsarNek")]
|
|
|
|
|
[PercentageComplete(100)]
|
2012-10-02 22:05:42 +00:00
|
|
|
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
2012-09-28 20:57:30 +00:00
|
|
|
|
public class XmlImporter : ContentImporter<object>
|
|
|
|
|
{
|
|
|
|
|
public override object Import(string filename, ContentImporterContext context)
|
|
|
|
|
{
|
2015-03-29 18:16:03 +02:00
|
|
|
|
using (XmlReader xmlReader = XmlReader.Create(filename))
|
2012-09-28 20:57:30 +00:00
|
|
|
|
{
|
2015-03-29 18:16:03 +02:00
|
|
|
|
return IntermediateSerializer.Deserialize<object>(xmlReader, filename);
|
2012-09-28 20:57:30 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|