0
x
、y
、flags
の数字をほぼすべて<coord>
タグから取得するためのヘルプが必要です。私は<pattern>
のタグとrotation
の属性を持つものの間のものは必要ありません。私は見つけることができない/それらを返すだろう、正しいXPathの文字列を考え出す。XPathでxmapのcoord属性を取得する
<parts count="1" current="0">
<part name="default part">
<objects count="37">
<object type="1" symbol="166">
<coords count="26">
<coord x="-13110" y="-20755" flags="1"/>
<coord x="-13360" y="-20705"/>
<coord x="-13680" y="-20615"/>
<coord x="-13610" y="-20375" flags="18"/>
</coords>
<pattern rotation="0">
<coord x="0" y="0"/>
</pattern>
</object>
<object type="0" symbol="170" rotation="0">
<coords count="1">
<coord x="-13770" y="-20815"/>
</coords>
</object>
<object type="1" symbol="157">
<coords count="13">
<coord x="-13195" y="-27090" flags="1"/>
<coord x="-13415" y="-25930"/>
<coord x="-13360" y="-25125"/>
</coords>
<pattern rotation="0">
<coord x="0" y="0"/>
</pattern>
</object>
だから私の所望の出力は次のようにかなっている:
-13110 -20755 1
-13360 -20705
-13680 -20615
-13610 -20375 18
-13195 -27090 1
-13415 -25930
-13360 -25125
これはJavaScriptである必要があります。ここではここfull map
感謝です!私はそれをjavascriptに解析した後、動作します! – Matis