This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Meld3-like templating using lxml

Project Description

A mostly-compatible implementation of Meld3 using lxml as the parsing and serialisation engine.

I previously forked Meld3 and made it use lxml, but the code wasn’t elegant as it didn’t use much of lxml’s additional features. This version is a from-the-ground-up rewrite based on the Meld3 documentation and test suite.

Key Differences

  • fillmeldhtmlform() is not implemented (it’s rather too magic)
  • findwithattrib is not implemented (as unclear how it interacts with namespaces; use lxml’s finders or xpath)
  • replace() follows the meld3 syntax; the lxml call of the same name is renamed replace_child()
  • The property parent doesn’t exist; use getparent()
  • You can pass lxml Elements or lists of Elements to replace(), content() and fillmelds()
  • When using structure=True the content must be broadly parsable as XML
  • repeat inserts adjacent to the original node, not at the end of the parent
  • doctypes to the write_* functions can be plain strings
Release History

Release History

This version
History Node

0.3

History Node

0.2

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
lxmlmeld-0.3.tar.gz (5.7 kB) Copy SHA256 Checksum SHA256 Source Mar 17, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting