XML文件是根据某ERP软件提供的格式生成,我使用XMLDOCUMENT对XML文件进行添加,查询操作,速度很慢,经查,用XMLTEXTWRITER写文件比较快,但不知道如何添加记录,XML文件格式如下:
<vouchers vouchertype="10" withdraw="False">
<voucher worked="False">
<header brdflag="1" cvouchtype="10" cwhcode="" ddate="2009-5-6 " cdepcode="" cmaker="" cdefine7="0" cwhname="预加工半成品库" cdepname="预加工检验组" csource="库存" cbustype="成品入库" vt_id="63" cdefine16="0" imquantity="0" iproorderid="0" editprop="" ccode="" />
<body>
<item cinvcode="03KW48BRLB01R" cbarcode="" cassunit="" iquantity="1" inum="" ichangerate="" iunitcost="0.042" cbatch="" dmadedate="" dvdate="" imassdate="" cposition="" cdefine22="AD004" cdefine23="QD001" cdefine24="2009-5-6 17:15:36" cdefine26="0.077" cdefine27="0.077" cdefine31="03KW48BRLB01R3620506A" cdefine33="预加工检合格" cdefine34="0506A" cfree1="" cfree2="" cfree3="" cfree4="" cfree5="" cfree6="" cfree7="" cfree8="" cfree9="" cfree10="" cmassunit="" editprop="" />
</body>
</voucher>
</vouchers>
用XMLTEXTWRITER只能在最后加上记录,不能在BODY下添加一个ITEM项,请问各位高人,有何办法????谢谢!!
DOC.LOAD(FILENAME)可以,但ITEM项超过3000条,这样占MC1000的资源就太大了,速度很慢!!!
<vouchers vouchertype="10" withdraw="False">
<voucher worked="False">
<header brdflag="1" cvouchtype="10" cwhcode="" ddate="2009-5-6 " cdepcode="" cmaker="" cdefine7="0" cwhname="预加工半成品库" cdepname="预加工检验组" csource="库存" cbustype="成品入库" vt_id="63" cdefine16="0" imquantity="0" iproorderid="0" editprop="" ccode="" />
<body>
<item cinvcode="03KW48BRLB01R" cbarcode="" cassunit="" iquantity="1" inum="" ichangerate="" iunitcost="0.042" cbatch="" dmadedate="" dvdate="" imassdate="" cposition="" cdefine22="AD004" cdefine23="QD001" cdefine24="2009-5-6 17:15:36" cdefine26="0.077" cdefine27="0.077" cdefine31="03KW48BRLB01R3620506A" cdefine33="预加工检合格" cdefine34="0506A" cfree1="" cfree2="" cfree3="" cfree4="" cfree5="" cfree6="" cfree7="" cfree8="" cfree9="" cfree10="" cmassunit="" editprop="" />
</body>
</voucher>
</vouchers>
用XMLTEXTWRITER只能在最后加上记录,不能在BODY下添加一个ITEM项,请问各位高人,有何办法????谢谢!!
DOC.LOAD(FILENAME)可以,但ITEM项超过3000条,这样占MC1000的资源就太大了,速度很慢!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货