<?xml version="1.0" encoding="utf-8"?> <CalibrationData> <CalConfig name="GENERIC"> <CalPath number="1" name="SG1" date="02/14/08 18:57:54" dayLimit="999"> <CalPoint freq="400" loss="1.0"/> <CalPoint freq="2400" loss="1.0"/> </CalPath> <CalPath number="2" name="SG2" date="02/14/08 18:57:54" dayLimit="999"> <CalPoint freq="400" loss="1.0"/> <CalPoint freq="2400" loss="1.0"/> </CalPath> </CalConfig> <CalConfig name="GPS_CDMA"> <CalPathLink srcCalConfig="GENERIC_GPS" srcPathNumber="1" destPathNumber="1"/> <CalPathLink srcCalConfig="GENERIC_GPS" srcPathNumber="2" destPathNumber="2"/> <CalPathLink srcCalConfig="CDMA" srcPathNumber="205" destPathNumber="205"/> <CalPathLink srcCalConfig="CDMA" srcPathNumber="205" destPathNumber="214"/> </CalConfig> </CalibrationData>
上面这个XML,相同CalConfig组下,内容不同,反序列化访问如何判断组下的类型,不方便用name属性,因为这是我精简的XML,原内容有3000行,不方便判断名称!
不能再加个属性?
别人写死了,不让改,我只是读修改值!
xmldocument自行操作,判断,解析=》new Entity=>赋值给该Entity
节点操作方法不想用!
自己解决,结帖!