From 9dd483d0638b03ac5cc1c4d659fe15c209036aa6 Mon Sep 17 00:00:00 2001 From: Walter Doerwald Date: Thu, 16 Feb 2012 14:40:31 +0100 Subject: Update source code in validation.txt so that doctests work. --- doc/validation.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/validation.txt b/doc/validation.txt index 08374772..51de8a89 100644 --- a/doc/validation.txt +++ b/doc/validation.txt @@ -153,9 +153,9 @@ The DTD information is available as attributes on the DTD object. The method .. sourcecode:: pycon - >>> dtd = etree.DTD(cStringIO.StringIO('')) + >>> dtd = etree.DTD(StringIO('')) >>> for el in dtd.iterelements(): - >>> print el.name + ... print el.name a b @@ -163,7 +163,7 @@ The method ``elements`` returns the element declarations as a list: .. sourcecode:: pycon - >>> dtd = etree.DTD(cStringIO.StringIO('')) + >>> dtd = etree.DTD(StringIO('')) >>> print len(dtd.elements()) 2 @@ -201,7 +201,7 @@ element content declaration objects: .. sourcecode:: pycon - >>> dtd = etree.DTD(cStringIO.StringIO('')) + >>> dtd = etree.DTD(StringIO('')) >>> con = dtd.elements()[0].content >>> print con.type, con.occur, con.name or plus None @@ -231,7 +231,7 @@ Attributes declarations have the following attributes/methods: Entity declarations are available via the ``iterentities`` and ``entities`` methods: - >>> dtd = etree.DTD(cStringIO.StringIO('')) + >>> dtd = etree.DTD(StringIO('')) >>> ent = dtd.entities()[0] >>> print ent.name, ent.orig, ent.content hurz @ @ -- cgit v1.2.1