Xpathrecord.

Eine XML-Datei-lesbare Python-Objekte-Bibliothek
Jetzt downloaden

Xpathrecord. Ranking & Zusammenfassung

Anzeige

  • Rating:
  • Lizenz:
  • Creative Commons Att...
  • Preis:
  • FREE
  • Name des Herausgebers:
  • Corey Porter
  • Website des Verlags:
  • http://gemcitysoftware.com

Xpathrecord. Stichworte


Xpathrecord. Beschreibung

Eine XML-Datei-lesbare Python-Objekte-Bibliothek XpathRecord ist eine Software, die ein Teil der Grunzen versucht, von der Umwandlung von XML in Objekte zu arbeiten. Folgende Folgendes ist ein sehr kurzes Beispiel für einen RSS-Parser.import xpathrecordclass rsspost (xpathrecord.xpathrecord): title = xpathrecord.textfield ('title / text ()') link = xpathrecord.textfield ('link / text ()') pubdate = xpathrecord.dateTimefield ('pubdate / text ()', '% A,% d% B% Y% H:% M:% s +0000') Def Main (): Import libxml2, urllib2, sysfor feed_url in sys.argv : doc = urllib2.urlopen (feed_url) .Lead () dom = libxml2.parsememory (doc, len (doc)) für post in rsspost.records (dom, '// item'): drucken 'post: Titel "Drucken":% s '% post.title () drucken' Link:% s '% post.link () drucken' Datum:% s '% post.pubdate () Wenn' __main__ '== __name __: Main ( ) Anforderungen: · Python


Xpathrecord. Zugehörige Software

Kbib

KBIB ist ein Bibtex-Management-Programm für KDE (ähnlich wie KBibtex). ...

359

Herunterladen