Question: I have an XML column with this value

```
<sso_links>
   <linktype>mytype</linktype>
   <url>http://mydomain.com</url>
   <linktype>mytype2</linktype>
   <url>http://somedomain.com</url>
</sso_links>

```

I've tried using SQL to query this by value but this only returns scalar type

```
SELECT XMLCOLUMN.value('//linktype[1]', varchar(max)),
XMLCOLUMN.value('//url[1]', varchar(max))
from table
where someid = '1'

```

This produced 2 rows from the XML. How can I output all values?

Answer: 
Oftentimes such patterns are evaluated in order, with the first prefix matching being the one chosen.

Try moving your most general regex to the end:

```
application = webapp.WSGIApplication([
    ('/(\w+)',MainMain)],
    ('/', MainMain),
    debug=True)

```
```
>>> url = 'http://example.appspot.com/abc%20asd'
>>> import urllib
>>> import urlparse
>>> urllib.unquote_plus(urlparse.urlparse(url)[2][1:])
'abc asd'

```