Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Convert gml to vml for graphical display

I have a gml file with coordinate tape like :
<gml:coordinate>
208,265,272,265,292,211,312,265,374,265,322,300,342,355,292,321,242,355,260,30
</gml:coordinate>
And I have used a DOM object to extract it successfully into a variable "A".

However I cannot write it back to a VML by DHTML method like the following
code.

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<script language="VBScript" FOR="window" EVENT="onload">

Set doc = CreateObject("Microsoft.XMLDOM")
doc.load("test.xml")
Set ONode=doc.documentElement

Set pNodes = ONode.selectNodes("//gml:coordinate")

For Each node In pNodes
MsgBox node.firstChild.nodeValue
V=InStr(node.firstChild.nodeValue," ")
B=node.firstChild.nodeValue
B=Replace(B," ",",")
A=Left(B,V-1)&" L "&Mid(B,V+1)
MsgBox A
DIVSTRING.innerHTML=A
Next

</script>

<style>
v\:* { behavior: url(#default#VML); }
</style>
</head>

<BODY>
<v:path v="M ID=""DIVSTRING"" x e" />
</BODY>
</HTML>

Do anyone know what wrong I have? please help me and let me know. Thank you
very much.
[1364 byte] By [Joe Lau] at [2007-11-9 15:24:29]