如何从javascript中提取rapidminer xpath值

时间:2014-12-07 22:04:41

标签: rapidminer

我想提取嵌入在javascript中的经度和纬度的rapidminer xpath值。

    < script type = "text/javascript" >
      $("document").ready(function() {
        MultiMaps.init('{"elementName":"map","latitude":"55.046253842870506","longitude":"-8.275406306447621","zoom":16,"showMarker":true,"showArea":false,"areaSize":0,"showControls":1,"draggable":1,"maxZoom":18,"minZoom":7,"hitcode":"100","zoomLocked":false,"lateLoad":true,"lateLoadIds":"#smi-map-link","bizmapWaitTime":"800","multipleAreas":[],"mapButtons":["map-button"],"satButtons":["sat-button"],"svButtons":["sv-button"],"clustering":true,"isMarkerDraggable":false,"jumpToGoogleIds":"","key":"AIzaSyBvf2e2eg1SyR7Lq5INzGDrIInkgKHT1oI","onlyGoogle":true,"lazyLoad":false}');
      }); < /script>

我试过

    < script type = "text/javascript" >
      $("document").ready(function() {
        MultiMaps.init('{"elementName":"map","latitude":"55.046253842870506","longitude":"-8.275406306447621","zoom":16,"showMarker":true,"showArea":false,"areaSize":0,"showControls":1,"draggable":1,"maxZoom":18,"minZoom":7,"hitcode":"100","zoomLocked":false,"lateLoad":true,"lateLoadIds":"#smi-map-link","bizmapWaitTime":"800","multipleAreas":[],"mapButtons":["map-button"],"satButtons":["sat-button"],"svButtons":["sv-button"],"clustering":true,"isMarkerDraggable":false,"jumpToGoogleIds":"","key":"AIzaSyBvf2e2eg1SyR7Lq5INzGDrIInkgKHT1oI","onlyGoogle":true,"lazyLoad":false}');
      }); < /script>

至少从javascript中提取所有文本,但它不适合我。有什么建议吗?

1 个答案:

答案 0 :(得分:0)

您需要使用JAVA字符串函数。找到纬度的起点,然后提取n个字符。对经度做同样的事情。