Xpathrecord

Een XML voor alleen-lezen Python-objectenbibliotheek
Download nu

Xpathrecord Rangschikking & Samenvatting

Advertentie

  • Rating:
  • Vergunning:
  • Creative Commons Att...
  • Prijs:
  • FREE
  • Naam uitgever:
  • Corey Porter
  • Uitgever website:
  • http://gemcitysoftware.com

Xpathrecord Tags


Xpathrecord Beschrijving

Een XML voor alleen-lezen Python-objectenbibliotheek Xpathrecord is een software die probeert een deel van het Grunt Work uit te nemen om XML in te transformeren naar objecten. Volgt een zeer kort voorbeeld van een RSS Parser.import XpathRecordclass rsspost (Xpathrecord.xpathrecord): titel = xpathrecord.textfield ('titel / tekst ()') link = xpathrecord.textfield ('link / tekst ()') pubdate = xpathrecord.datetimefield ('PubDate / Text ()', '% A,% D% B% Y% H:% M:% S +0000') Def Main (): import libxml2, urllib2, sysfor feed_url in Sys.Argvv : DOC = URLLIB2.URLOPEN (FEED_URL) .READ () DOM = LIBXML2.PARSMEMORY (DOC, LEN (DOC)) VOOR POST IN RSSPOST.Records (DOM, '// Item'): PRINT 'POST: 'Print'-titel:% S'% Post.Title () Afdrukken 'Link:% S'% Post.Link () Afdrukken 'Datum:% S'% post.Pubdate () Als '__Main__' == __Name __: Main ( ) Vereisten: · Python


Xpathrecord Gerelateerde software

Griffon Editor

Griffon is IDE onder GNU / Linux, het integreert een geavanceerde hulp voor de ontwikkeling (PERL, BASH, C, HTML). ...

166

Downloaden