Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install xupdate-processor

How to install xupdate-processor

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install xupdate-processor
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.4 Available View build log
0.3 Available View build log
0.1 Available View build log
Windows (64-bit)
0.4 Available View build log
0.3 Available View build log
0.1 Available View build log
Mac OS X (10.5+)
0.4 Available View build log
0.3 Available View build log
0.1 Available View build log
Linux (32-bit)
0.4 Available View build log
0.3 Available View build log
0.1 Available View build log
Linux (64-bit)
0.4 Available View build log
0.3 Available View build log
0.1 Available View build log
 
License
GPL
Dependencies
Lastest release
version 0.4 on Jan 22nd, 2011

Introduction

Apply xupdate diff on XML documents.

Installation

python setup.py install

Testing

python setup.py test

Usage

just like this:

>>> from xupdate_processor import applyXUpdate
>>> from lxml import etree
>>> xml_doc_string = """<?xml version="1.0"?>
<erp5>
  <object portal_type="Test">
    <title>A</title>
  </object>
  <object portal_type="Test">
    <title>A</title>
  </object>
  <object portal_type="Test">
    <title>A</title>
  </object>
</erp5>
"""
>>> xml_xu_string = """<?xml version="1.0"?>
<xupdate:modifications xmlns:xupdate="http://www.xmldb.org/xupdate" version="1.0">
  <xupdate:update select="/erp5/object[2]/title">B</xupdate:update>
  <xupdate:update select="/erp5/object[3]/title">C</xupdate:update>
</xupdate:modifications>
"""
>>> result_tree = applyXUpdate(xml_xu_string=xml_xu_string, xml_doc_string=xml_doc_string)
>>> print etree.tostring(result_tree, pretty_print=True)
<erp5>
  <object portal_type="Test">
    <title>A</title>
  </object>
  <object portal_type="Test">
    <title>B</title>
  </object>
  <object portal_type="Test">
    <title>C</title>
  </object>
</erp5>

History

0.5 (unreleased)
0.4 (2010-01-21)
  • [Fix] sub element might have been append in wrong order

    [nicolas Delaby]

0.3 2010-01-19
  • Update setup.py
0.2 (2010-01-19)
  • refactor egg structure directory

    [nicolas Delaby]

  • Use unittest module instead of DOCTEST

    [nicolas Delaby]

  • add PyXML dependency to support sax parser with xml.sax.handler.feature_namespace_prefixes feature.

    System Message: ERROR/3 (<string>, line 83)

    Unexpected indentation.

    [nicolas Delaby]

  • remove zope.interface dependency

  • [Fix] sub element might have been append in wrong order

0.1 (2009-12-12)
  • Initial implementation

    [nicolas Delaby]

Subscribe to package updates

Last updated Jan 22nd, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.