I'm not sure if this is a good idea. What about those people (currently in the majority) who have normal displays and limited bandwidth or data cap. As it is web pages are so bloated, what happens when you add web content that is made for retina displays. Suddenly these bloated pages are now an order of magnitude larger in size.
Showing posts with label webdev. Show all posts
Showing posts with label webdev. Show all posts
Saturday, September 22, 2012
Friday, September 11, 2009
On tornado
Sunday, December 24, 2006
some simple XML (opml) parsing in Python
Say you have an opml file, whose filename is stored in the variable "filename":
from xml.dom import minidom
xmldoc = minidom.parse(filename)
"""
Print all the feed urls in the file
"""
for x in xmldoc.getElementsByTagName('outline'):
if x.attribute.has_key('xmlUrl'):
print(x.attributes["xmlUrl"].value)
Where your opml doc probably looks like:
<opml>
<head>
<title>Title for document</title>
</head>
<body>
<outline text="somerssfeedtext" title="somerssfeedtitle" htmlUrl="urltofeedssite" xmlUrl="urltofeed">
...
... (more outline elements)
</body>
</opml>
For more xml/python goodness look here.
If you want to use xpath/xml/python, look here.
from xml.dom import minidom
xmldoc = minidom.parse(filename)
"""
Print all the feed urls in the file
"""
for x in xmldoc.getElementsByTagName('outline'):
if x.attribute.has_key('xmlUrl'):
print(x.attributes["xmlUrl"].value)
Where your opml doc probably looks like:
<opml>
<head>
<title>Title for document</title>
</head>
<body>
<outline text="somerssfeedtext" title="somerssfeedtitle" htmlUrl="urltofeedssite" xmlUrl="urltofeed">
...
... (more outline elements)
</body>
</opml>
For more xml/python goodness look here.
If you want to use xpath/xml/python, look here.
Subscribe to:
Posts (Atom)
Mozilla and hypocrisy
Right, but what about the experiences that Mozilla chooses to default for users like switching to Yahoo and making that the default upon ...
-
via VMware blog
-
Intrusion Detection with Tripwire : "Do this by adding a comma after the severity= line and putting emailto= on the next line, followed...
-
Right, but what about the experiences that Mozilla chooses to default for users like switching to Yahoo and making that the default upon ...