Formatter

Added a feature where single field classes can just put their data into the classes v (value) attribute.
This commit is contained in:
Marc Hernandez 2019-07-04 06:18:41 -07:00
parent 98db61a4a5
commit 1947de8a84

View File

@ -337,13 +337,22 @@ public class XmlFormatter2 : IFormatter
XmlElement childElem = getNamedChild( allChildren, name ); XmlElement childElem = getNamedChild( allChildren, name );
if( childElem != null ) if( childElem != null )
{ {
object childObj = Deserialize( childElem, childFi.FieldType, obj ); object childObj = Deserialize( childElem, childFi.FieldType, obj );
childFi.SetValue( obj, childObj ); childFi.SetValue( obj, childObj );
} }
} else if( miArr.Length == 1 )
{
object childObj = Deserialize( elem, childFi.FieldType, obj );
childFi.SetValue( obj, childObj );
}
}
} }
return obj; return obj;