XPathGraph ã¨ã¯
http://xpath.kayac.com/
URL 㨠XPath ãæå®ããã¨ä¸æ¥ã«ä¸åãã® URL ãã¹ã¯ã¬ã¤ãã³ã°ã㦠XPath å¼ã示ãå¤ãã°ã©ãã«ãã¦ãããï¼ã¨ããç»æçãªãµã¼ãã¹ã§ãã
ä¾ãã°ã URL 㨠XPath ãæå®ããã ãã§ä»¥ä¸ã®ãããªã°ã©ããä½ãã¦ãã¾ãã¾ãã
æ¬å½ã«æ¥½ãããã¨ãåºæ¥ããã§ã¯ã¯ã¯ã¯ãã¦ã¾ãï¼
ã§ã
ã¾ã XPath ãç»é²ãã¦ãã人ãæå¤ã¨å°ãªãã®ã§ããã²ãã£ã¨ãã¦ããã®ãµã¼ãã¹ã®ä½¿ãã©ãããåãããªãã®ããªãããã¨æãã¾ããã
ã¨ããããã§
XPath ã§åºæ¥ããã¨ã®ãã³ããå°ãç´¹ä»ãããã¨æãã¾ãã
足ãç®ãå¼ãç®ãããç®ãå²ãç®
XPath ã§ã¯æ®éã«æ°å¤ã®æ¼ç®ãã§ãã¾ãã
ãã¨ãã°ã //div[@class=counter] ã§åå¾ãã¦ãã div è¦ç´ ã 1000 ã¨ããæ°å¤ãæã£ã¦ããã¨ããã¨
2 * (//div[@class=counter] + 200)
ã¨ããããã«ãã®æ°å¤ãè¨ç®å¼ã«ãã®ã¾ã¾çªã£è¾¼ããã¨ãã§ãã¾ãã
ãã ããå²ãç®ã¯ / ã§ã¯ãªãã div ã使ãã¾ãã
//div[@class=counter] div 3
ä½ããæ±ããæ¼ç®ã¯ mod ã使ãã¾ãã
//div[@class=counter] mod 3
ããã使ãã°ãä¾ãã°åä½ãå¤æãã¦ã°ã©ãã«ããã¨ãããã¨ãç°¡åã«ã§ãã¾ããã
便å©ãªé¢æ°é¡
XPathGraph ã¯ã°ã©ããä½ããµã¼ãã¹ãªã®ã§ãã³ã³ãã³ãããæ°å¤ãæ¢ãã¦ããªããã°ãªããªãããã«æãã¾ãããå®ã¯ããã¨ãéãã¾ããã
ãã¨ãã°ã以ä¸ã®ãããªãã®ãã°ã©ãã«ãããã¨ãã§ãããã§ãã
count ã使ã£ã¦ãã®ãã¼ã¸ã®å
¨è¦ç´ æ°ãã°ã©ãã«ããã
count(//*)
count ã使ã£ã¦ç¹å®ã®è¦ç´ ã®æ°ã調ã¹ã
count(//ul[@class="userlist"]/li)
string-length ã使ã£ã¦ãã®ãã¼ã¸ã®æåæ°ãã°ã©ãã«ããã
string-length(//*)
å ·ä½ä¾ã¨ãã¦ã¯ http://coderepos.org/share/wiki ã®ãã¼ã¸ã§ä»¥ä¸ã® XPath å¼ã使ãã¨ã CodeRepos ã®ã³ããã¿ã¼æ°ãã°ã©ãã«ã§ãã¾ãã
count(id("Committers")/following-sibling::ul/li)
ãªã©ãªã©
XPath å¼ã¯åç´ãªãã¼ãåå¾ãããããã®å¼ã§ã¯ãªããæååã®æä½ãæ°å¤ã®æ¼ç®ãã§ããã®ã§ãã
ã§ãã®ã§ãããããã¨èããã°ã XPathGraph ã®å¯è½æ§ã¯ç¡éã«åºãã£ã¦ããã¨æãã¾ãã
ã¾ã¨ã
XPathGraph ãããã§ãï¼
ã¿ãªãããé¢ç½ãã¢ã¤ãã¢ãããã°ä½ãä½ã£ã¦ã¿ã¦ã¯ãããã§ãããã