This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This package provides zope interfaces for lxml objects. Far from being complete but a starting point.

Interfaces

Interfaces are here:

>>> import gocept.lxml.interfaces

There is an interface for lxml.etree elements:

>>> import lxml.etree
>>> xml = lxml.etree.fromstring('<a/>')
>>> gocept.lxml.interfaces.IElement.providedBy(xml)
True

And for objectifieds:

>>> import lxml.objectify
>>> obj = lxml.objectify.fromstring('<a><str>holla</str></a>')
>>> gocept.lxml.interfaces.IElement.providedBy(obj)
True
>>> gocept.lxml.interfaces.IObjectified.providedBy(obj)
True
>>> gocept.lxml.interfaces.IElement.providedBy(obj.str)
True
>>> gocept.lxml.interfaces.IObjectified.providedBy(obj.str)
True

Objectified parsers

There is a helper for creating objectifieds from file handles in gocept.lxml.objectify. Open a file:

>>> import os.path
>>> import gocept.lxml.objectify
>>> filename = os.path.join(
...     os.path.dirname(__file__),
...     'ftesting.zcml')
>>> xml_file = file(filename)

And parse it:

>>> xml = gocept.lxml.objectify.fromfile(xml_file)
>>> xml
<Element {http://namespaces.zope.org/zope}configure at ...>

This really is objectified:

>>> gocept.lxml.interfaces.IObjectified.providedBy(xml)
True
>>> xml.include.get('package')
'zope.app.component'

For convinience fromstring is also defined in gocept.lxml.objectify:

>>> xml = gocept.lxml.objectify.fromstring('<a><b/></a>')
>>> xml
<Element a at ...>
>>> gocept.lxml.interfaces.IObjectified.providedBy(xml)
True

Changes

0.2.1 (2008-02-14)

  • Lifted dependency on lxml<2.0dev so lxml 2 can be used now.
Release History

Release History

0.2.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
gocept.lxml-0.2.1.tar.gz (3.8 kB) Copy SHA256 Checksum SHA256 Source Feb 14, 2008

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