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