Solved! Go to Solution.
Parse xml (the ArcGIS Flex Viewer is a big sample of how to do it)
Create MapPoints from readed data
Create array of Graphics with created geometries and required(not nullable) attributes
applyEdits()
FeatureLayer.applyEdits([ptGraphic],null,null,true,null);
Xiannian,
Make sure you are passing graphics with all required attributes (as Ivan Mentioned) as an array.
If it is a single graphic use code like this (all the items in red are required):
FeatureLayer.applyEdits([ptGraphic],null,null,true,null);
Xiannian,
Just like Ivan mentioned non nullable attributes. No you do not need to populate the OID or GlobalID fields. Not sure what problem you are having as I do editing this way all the time.