I want to get the href value of the link that has rel='edit', i am wondering how i can do it.
<link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/****'/>
<link rel='edit' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/****'/>
I am trying
this.url = entry.getElementsByTagName('link')[1].getAttribute('href');
but i get href of the first link.
thanks.
EDIT :
now what i don't understand is thateven when i am sure i get the right link, the href value is not what i expect
<link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/**********/full/ba0fz'/>
<link rel='edit' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/**********/full/ba0fz/27mpei328jki4e'/>
what i want is to do a regex on the href i want to get the "27mpei328jki4e" but instead of getting the full url, i get the short one, do you have any idea of why i get this result? no matter what method i use, neither the queryselector nor getElementsByTagName.
my document is an xml
<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gsx='http://schemas.google.com/spreadsheets/2006/extended'>
<id>************</id>
<updated>2013-06-06T17:38:25.749Z</updated>
<category scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#list'/>
<title type='text'>30/05/2013 17:12:42</title><content type='text'>
timeprocess: 01/01/1900, useroid: ICCOM-00000327,
</content>
<link rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/**********/full/ba0fz'/>
<link rel='edit' type='application/atom+xml' href='https://spreadsheets.google.com/**********/full/ba0fz/27mpei328jki4e'/>
<gsx:time>30/05/2013 17:12:42</gsx:time>
<gsx:timeprocess>01/01/1900</gsx:timeprocess>
<gsx:useroid>ICCOM-00000327</gsx:useroid>
</entry>