如何通过xpath或css选择器在地图上定位元素

时间:2015-04-24 13:23:35

标签: html css xpath

我需要在代码中找到circle元素。我试过.// * [@ id =' charticsLayer3_layer'] / circir但它没有用。

<g id="graphicsLayer3_layer" data-geometry-type="polygon" transform="matrix(1.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000)" style="display: block;">
<g/>
<circle fill="rgb(255, 255, 255)" fill-opacity="0.25" stroke="rgb(0, 0, 0)" stroke-opacity="1" stroke-width="1.3333333333333333" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" cx="961" cy="-424" r="8" transform="matrix(1.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000)" fill-rule="evenodd" stroke-dasharray="none" dojoGfxStrokeStyle="solid"/>
<circle fill="rgb(255, 255, 255)" fill-opacity="0.25" stroke="rgb(0, 0, 0)" stroke-opacity="1" stroke-width="1.3333333333333333" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" cx="774" cy="528" r="8" transform="matrix(1.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000)" fill-rule="evenodd" stroke-dasharray="none" dojoGfxStrokeStyle="solid"/>
<circle fill="rgb(255, 255, 255)" fill-opacity="0.25" stroke="rgb(0, 0, 0)" stroke-opacity="1" stroke-width="1.3333333333333333" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" cx="433" cy="18" r="8" transform="matrix(1.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000)" fill-rule="evenodd" stroke-dasharray="none" dojoGfxStrokeStyle="solid"/>
<g id="graphicsLayer3_layer" data-geometry-type="polygon" transform="matrix(1.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000)" style="display: block;">
<g/>
<circle fill="rgb(255, 255, 255)" fill-opacity="0.25" stroke="rgb(0, 0, 0)" stroke-opacity="1" stroke-width="1.3333333333333333" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" cx="961" cy="-424" r="8" transform="matrix(1.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000)" fill-rule="evenodd" stroke-dasharray="none" dojoGfxStrokeStyle="solid"/>
<circle fill="rgb(255, 255, 255)" fill-opacity="0.25" stroke="rgb(0, 0, 0)" stroke-opacity="1" stroke-width="1.3333333333333333" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" cx="774" cy="528" r="8" transform="matrix(1.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000)" fill-rule="evenodd" stroke-dasharray="none" dojoGfxStrokeStyle="solid"/>
<circle fill="rgb(255, 255, 255)" fill-opacity="0.25" stroke="rgb(0, 0, 0)" stroke-opacity="1" stroke-width="1.3333333333333333" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" cx="433" cy="18" r="8" transform="matrix(1.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000)" fill-rule="evenodd" stroke-dasharray="none" dojoGfxStrokeStyle="solid"/>

1 个答案:

答案 0 :(得分:1)

找到所有三个圈子的css选择器是#graphicsLayer3_layer circle