为何出错:
Dim a As String
a = " <?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<!-- Processed by GE-Path -->
<Document>
<name>New-Path</name>
<open>1</open>
<LookAt>
<longitude>2.2</longitude>
<latitude>1.11</latitude>
<range>1000000</range>
<tilt>0</tilt>
<heading>0</heading>
</LookAt>
<Style id="sgrillo1">
<IconStyle>
<Icon>
<href>root://icons/palette-4.png</href>
<y>128</y>
<w>32</w>
<h>32</h>
</Icon>
</IconStyle>
<LabelStyle>
<color>ffffffff</color>
<scale>1</scale>
</LabelStyle>
</Style>
<Folder>
<open>0</open>
<name>Names</name>
<Placemark>
<name>dd</name>
<description>ee</description>
<styleUrl>#sgrillo1</styleUrl>
<Point>
<altitudeMode>clampedToGround</altitudeMode>
<coordinates>2.2, 1.11</coordinates>
</Point>
</Placemark>
</Folder>
</Document>
</kml> "
FileSys.WriteAllText("C:\Documents and Settings\Administrator\桌面\wwffw.kml", a , True,Encoding.UTF8)
对A变量的赋值不成功(这里出错),要如何更改这个代码:
Dim a As String
a = " .....
.......
......"
FileSys.WriteAllText("C:\Documents and Settings\Administrator\桌面\wwffw.kml", a , True,Encoding.UTF8)
[此贴子已经被作者于2010-11-15 10:21:27编辑过]