File: //proc/2/task/2/root/usr/lib/python2.4/Demo/xml/roundtrip.pyc
mò
‚=5Dc @ s{ d Z d k Z d k Z d k l Z l Z l Z d e i f d „ ƒ YZ e ƒ Z e i
e ƒ ƒ e i e i d ƒ d S( ss
A simple demo that reads in an XML document and spits out an equivalent,
but not necessarily identical, document.
N( s saxutilss handlers make_parsert ContentGeneratorc B sM t Z e i d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
RS( Nc C s t i i | ƒ | | _ d S( N( t handlert ContentHandlert __init__t selft outt _out( R R ( ( t( /usr/lib/python2.4/Demo/xml/roundtrip.pyR s c C s | i i d ƒ d S( Ns, <?xml version="1.0" encoding="iso-8859-1"?>
( R R t write( R ( ( R t
startDocument s c C sh | i i d | ƒ x= | i ƒ D]/ \ } } | i i d | t i | ƒ f ƒ q! W| i i d ƒ d S( Nt <s %s="%s"t >( R R R t namet attrst itemst valuet saxutilst escape( R R R
R ( ( R t startElement s
'c C s | i i d | ƒ d S( Ns </%s>( R R R R ( R R ( ( R t
endElement s c C s | i i t i | ƒ ƒ d S( N( R R R R R t content( R R ( ( R t
characters s c C s | i i | ƒ d S( N( R R R R ( R R ( ( R t ignorableWhitespace# s c C s | i i d | | f ƒ d S( Ns <?%s %s?>( R R R t targett data( R R R ( ( R t processingInstruction&