Where Am I ? Getting an ABSOLUTE XPATH with a HTML::Element object. :: 2008/12/19 16:13
HTML::TreeBuilder::XPath 로
HTML DOM 을 꾸미고 XPath 로 접근하는 것은 문제가 없다.
그러나 특정한 XPath의 Absolute XPath 를 알려고 하니,
적당한 메쏘드가 없어보였다.
첫번째 인자로 TreeBuilder 오브젝트를, 두번째에 HTML::Element 를 넣으면,
child index 까지 지정된 XPath 를 얻을 수 있다.
If you need an ABSOLUTE XPATH of a HTML::Element object with HTML::TreeBuilder::XPath,
you can get it using this function.
sub whereami
{
my $tree = shift;
my $el = shift;
my $DEBUG = shift;
my $pn = $el->getParentNode();
my $path='';
if( $pn )
{
if( $pn->isa('HTML::Element') )
{
$path = whereami($tree,$pn,$DEBUG);
}
}
my $pindex;
my $mypath = $path."/".$el->getName();
if( $mypath )
{
my $siblings = $tree->findnodes($mypath);
my $cnt=1;
while(my $sib = $siblings->shift() )
{
if( $sib eq $el )
{
$mypath .= "[${cnt}]";
last;
}
$cnt++;
}
# add here 'id' and 'class' attributes for better.
print "$mypath\n" if $DEBUG;
}
return $mypath;
}
xpath input:
//td[@id="MAIN_GOODS_PRICE"]
absolute xpath output:
/html[1]/body[1]/form[1]/table[1]/tr[1]/td[1]/table[5]/tr[1]/td[1]/table[1]/tr[1]/td[3]/table[1]/tr[1]/td[1]
css 기반 UI 를 구성할 때의 필수 유틸 :: 2008/11/30 10:42
- 파이어폭스 + 파이어버그
- MezerTools : http://www.bayden.com/mezer/
- 화면확대툴 : http://www.iconico.com/magnifier/
은하 그림~ :: 2008/11/19 17:32
What are differences on teaching to someguys? :: 2008/11/18 16:44
I am teacing Computer Programming to my GF everydays.
I felt that there are differences between teaching to my GF and others.
1st, I feel angry to her when she can't understand, but not to others.
2nd, I cannot explain as well as simple to my GF, but not to others.
What makes me like that?
But. sometimes. I treat her well as others.
I don't know that what's the problem.
the First Eng. Daily Log :: 2008/11/18 01:01
I have read an e-book mentioning studying English today.
The writer is a Korean doctor in Newyork city who has moved since several years.
He mentioned problems of curriculums for English in Korea.
His big points for studying English are simple.
Just read with sound in right pronunciation.
And read and so on.
You just need to communicate with other people.
I am interesting of this book.
So, I started writing daily log in English.
That's all.
오늘 일기 :: 2008/10/29 06:18
10분째 뭔가 그럴싸한 글을 남기려고
썼다가 지웠다가 하고 있다.
인간에 대한 탐구를 썼다가,
사랑에 대한 결론을 썼다가,
인생에 대한 정의를 썼다가,
결국 완전히 맞아떨어지는 말이 없어서..
그냥 정말 방금 한 짓을 쓰고 있다.
아까 2시간정도 자긴했지만,
또 눈이 무겁기도 하지만,
이 시간에 깨어있는 것이
도전을 하는 것 같기도 하고,
승산이 있어보이는데다가,
결과에 대해서 타협하기도 좋을거 같아서
즐기고 있다.
그러고 있다는 증거도 남길겸,
성공의 트로피를 만들듯이
한줄 한줄 감상적인 말로 채운다.
이런 식의 글은 한줄씩 쓸때마다
기대되고 설레고,
다시 읽고서 빠져든다.
몇줄 올라가 통채로 지워서 일관성을 유지시키고,
떠오르는대로 다시 전개하다가
글 전체가 다르게 해석되는 것을 발견하면
그 즐거움은 여느 퍼즐을 푸는 것에 비할 바가 아니다.
나는 몽상가이지만,
때로는 현실의 헛점을 찾기도 하고,
기괴한 방법으로 득을 보기도 한다.
누구도 이미 답을 가지지 않은 일은 내 것이다.
누군가 한 것은 시시하다.
멋있어보이려고 이런 말을 자주 하는 편이지만,
나 스스로 답을 구하려다
다시 이 말을 만나는 것은 오랜만이다.
다시 한번 내가 가야할 길, 해야할 것에 대해서
고민할 때가 왔나보다.
좀 헷갈릴수도 있는 문제 :: 2008/10/14 00:52
3만원을 맡길경우 3년에 3000원의 이자가 붙는 A은행과
4만원을 맡길경우 4년에 4000원의 이자가 붙는 B은행이 있다.
만원을 맡길려고 할때 어느 은행에 맡기는 것이 더 이득인가?
정답보기클릭
난 같다고 생각했는데, 정말 -_- 헷갈린다.
이게 금전감각이 없다는 증거라는데...증명되어버렸다.
아.................ㅡ,.ㅡ
-
Hydrocodone.
Tracked from Hydrocodone cough syrup. | 2008/10/23 06:13 | DELHydrocodone guaifenesin syreth.
-
Buy hydrocodone no prescription.
Tracked from Hydrocodone apap 5 500. | 2008/10/27 17:18 | DELHydrocodone. Ic hydrocodone apap 5 500.
-
Hydrocodone without prescription.
Tracked from 3190 v hydrocodone. | 2008/10/28 16:46 | DELHydrocodone. Half life of hydrocodone in fetus. Hydrocodone for sale. Hydrocodone allergy symptom. Buy hydrocodone online.
-
Cialis online.
Cialis precautions. Buying generic cialis. Side effects of cialis. Cialis vs viagra. Cialis. Generic cialis.
-
Buy cialis.
Tracked from Cialis and levitra. | 2008/11/01 06:19 | DELTaking viagra with cialis. Buy cialis. Cialis. Cheapest cialis. Free sample cialis. Generic cialis.
-
Purchase hydrocodone online.
Tracked from Buy hydrocodone online without a prescription. | 2008/11/02 07:09 | DELHydrocodone. Hydrocodone international pharmacies. Hydrocodone addiction. Online prescription for hydrocodone.
-
Easy way to buy hydrocodone online.
Tracked from How long does hydrocodone stay in your system. | 2008/11/03 07:05 | DELHydrocodone. Hydrocodone apap. Easy way to buy hydrocodone online. Buy hydrocodone online. Purchase hydrocodone without a prescription. Hydrocodone 1923. Buy hydrocodone online without a prescription. Www.bulevart.net hydrocodone-withdraw-symtoms.html.
-
Cialis best price buy online.
Tracked from Cialis uk suppliers. | 2008/11/04 06:35 | DELGeneric cialis. Cialis best price buy online. Cialis.
-
Hydrocodone without prescription.
Tracked from Half life of hydrocodone in fetus. | 2008/11/06 06:18 | DELHow to make hydrocodone. Hydrocodone. I had a healthy baby while i took hydrocodone. Easy way to buy hydrocodone online. Hydrocodone without persciption.
-
Using cialis.
Tracked from Buy cialis. | 2008/11/12 07:20 | DELCialis.
-
Cialis.
Tracked from Cialis and levitra. | 2008/11/14 06:53 | DELCialis and addiction. Cialis st. Cialis and pill splitting. Cialis free sample.
2008-09-19 :: 2008/09/22 14:27
MBTI... :: 2008/09/19 05:49
간이테스트프로그램 다운로드 : http://blog.naver.com/polystar89?Redirect=Log&logNo=53659291
잠이 오지 않아서
(나이먹으면 그렇다나..)
간만에 MBTI 테스트를 했다.
군대에서 난생 처음 받았을때에는 INTP
언젠가부터 ENTP 로 나오더니
지금도 ENTP이다.
E는 I와 많이 절충되어있으나, N,T,P 는 압도적인 선택을 받았다.
I 에서 E로 넘어가는 것인지...
사람들과 쉽게 친해지고,
내가 관심있는 일은 복잡하고 어려울수록 더 힘을 얻는다...
관습대로 하는 것을 꺼린다..
권위에 대항해보고 나서야, 권위를 따른다.
삐뚤어진 유머...
가만 생각해보니
잠이 오지 않는게 아니다.
잠을 자기 싫었다.
뭔가 해야만 할 것 같은데 그게 뭔지 모르겠다.
응가도 이런 심정일까?
고속버스를 예매하다가.. :: 2008/09/14 18:49
귀경표를 예매하려고 kobus에 들어갔다.
15일 아침 8시 5분 버스자리하나가 비었길래 계좌이체 예약을 선택하고
진행시켰더니.. 그놈의 보안프로그램이 없어서 진행을 못한다고 한다.
ActiveX를 설치해주던중 웃긴 경우가 생겼다.
"브라우저를 모두 끄고 진행해달라"
XecureWeb 덕분에 예약 자리를 놓쳤다.
XecureWeb 은 무슨생각으로 일하는 건지 몰라도,
ActiveX의 기초도 모르는 것 같다.
구버전이 사용중이면, 임시위치에 다른 이름으로 사본을 만들어 설치하면 되는것이고,
전혀 상관없는 다른 프로세스의 브라우저까지 꺼주길 강요하는 것은 잘못된 처사다.
사본으로 설치하고 레지스트리에 등록하면, 새로고침만으로 적용시킬수 있다.
그러나, 나는 초도설치였고, 그래서 충돌날 이유가 없었다.
그런데 왜 브라우저를 끄라고 강요하는건가?
도대체가.. 거기 개발책임자란 작자는 개념이 있는지 모르겠다.







