Formatter
Added a feature where single field classes can just put their data into the classes v (value) attribute.
This commit is contained in:
parent
98db61a4a5
commit
1947de8a84
@ -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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user