/// <summary>
/// Return an XmlSerializer to override the root serialization.
/// </summary>
/// <param name="objType"></param>
/// <returns></returns>
private static XmlSerializer CreateOverrider(Type objType)
{
// Create an XmlRootAttribute overloaded constructer
//and set its namespace.
XmlRootAttribute myXmlRootAttribute =
new XmlRootAttribute("root");
myXmlRootAttribute.Namespace = "";
// Create the Serializer, and return it.
XmlSerializer myXmlSerializer = new XmlSerializer
(objType, myXmlRootAttribute);
return myXmlSerializer;
}
/// Return an XmlSerializer to override the root serialization.
/// </summary>
/// <param name="objType"></param>
/// <returns></returns>
private static XmlSerializer CreateOverrider(Type objType)
{
// Create an XmlRootAttribute overloaded constructer
//and set its namespace.
XmlRootAttribute myXmlRootAttribute =
new XmlRootAttribute("root");
myXmlRootAttribute.Namespace = "";
// Create the Serializer, and return it.
XmlSerializer myXmlSerializer = new XmlSerializer
(objType, myXmlRootAttribute);
return myXmlSerializer;
}
No comments:
Post a Comment