假设在C盘下路径C:\grid.xml,有个grid.xml文件,内容如下,我想用对这个xml文件进行读,写操作,我自己试着用WindowsFormApplication 这个project来对这个xml来操作,但是没成功呢,希望高手能给我说下读写xml的步骤,我是新手,非常感谢大家的帮忙~~<?xml version="1.0" encoding="UTF-8" ?>
- <!-- Document :grid.xml
Created on : 2010/6/17
Author :
Description:
Purpose of the document follows. -->
- <PropDataBucket name="grid" version="1.0">
- <PropDataRow name="smoke" index="0" type="custom">
- <target name="properties">
<property name="GridPlane_ShowGridPlane" value="true" />
<property name="GridPlane_InifiteSize" value="true" />
<property name="GridPlane_X_Axis" value="1000.00" />
<property name="GridPlane_Y_Axis" value="1000.00" />
<property name="GridPlane_Color" value="yellow" />
<property name="GridPlane_Transparency" value="5598" />
<property name="GridSpace_X_Axis" value="1555.00" />
<property name="GridSpace_Y_Axis" value="1555.00" />
<property name="MajorLine_LineWeight" value="2" />
<property name="MajorLine_LineColor" value="red" />
<property name="MajorLine_GridSpaceNumber" value="10" />
<property name="MinorLine_LineWeight" value="2" />
<property name="MinorLine_LineColor" value="green" />
<property name="Displayunits" value="cm" />
</target>
</PropDataRow>
- <PropDataRow name="smoke2" index="1" type="custom">
- <target name="properties">
<property name="GridPlane_ShowGridPlane" value="true" />
<property name="GridPlane_InifiteSize" value="false" />
<property name="GridPlane_X_Axis" value="3000.00" />
<property name="GridPlane_Y_Axis" value="9000.00" />
<property name="GridPlane_Color" value="red" />
<property name="GridPlane_Transparency" value="398" />
<property name="GridSpace_X_Axis" value="5555.00" />
<property name="GridSpace_Y_Axis" value="4555.00" />
<property name="MajorLine_LineWeight" value="3" />
<property name="MajorLine_LineColor" value="green" />
<property name="MajorLine_GridSpaceNumber" value="20" />
<property name="MinorLine_LineWeight" value="1" />
<property name="MinorLine_LineColor" value="yellow" />
<property name="Displayunits" value="cm" />
</target>
</PropDataRow>
</PropDataBucket>
- <!-- Document :grid.xml
Created on : 2010/6/17
Author :
Description:
Purpose of the document follows. -->
- <PropDataBucket name="grid" version="1.0">
- <PropDataRow name="smoke" index="0" type="custom">
- <target name="properties">
<property name="GridPlane_ShowGridPlane" value="true" />
<property name="GridPlane_InifiteSize" value="true" />
<property name="GridPlane_X_Axis" value="1000.00" />
<property name="GridPlane_Y_Axis" value="1000.00" />
<property name="GridPlane_Color" value="yellow" />
<property name="GridPlane_Transparency" value="5598" />
<property name="GridSpace_X_Axis" value="1555.00" />
<property name="GridSpace_Y_Axis" value="1555.00" />
<property name="MajorLine_LineWeight" value="2" />
<property name="MajorLine_LineColor" value="red" />
<property name="MajorLine_GridSpaceNumber" value="10" />
<property name="MinorLine_LineWeight" value="2" />
<property name="MinorLine_LineColor" value="green" />
<property name="Displayunits" value="cm" />
</target>
</PropDataRow>
- <PropDataRow name="smoke2" index="1" type="custom">
- <target name="properties">
<property name="GridPlane_ShowGridPlane" value="true" />
<property name="GridPlane_InifiteSize" value="false" />
<property name="GridPlane_X_Axis" value="3000.00" />
<property name="GridPlane_Y_Axis" value="9000.00" />
<property name="GridPlane_Color" value="red" />
<property name="GridPlane_Transparency" value="398" />
<property name="GridSpace_X_Axis" value="5555.00" />
<property name="GridSpace_Y_Axis" value="4555.00" />
<property name="MajorLine_LineWeight" value="3" />
<property name="MajorLine_LineColor" value="green" />
<property name="MajorLine_GridSpaceNumber" value="20" />
<property name="MinorLine_LineWeight" value="1" />
<property name="MinorLine_LineColor" value="yellow" />
<property name="Displayunits" value="cm" />
</target>
</PropDataRow>
</PropDataBucket>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货