summaryrefslogtreecommitdiff
path: root/doc/tutorial.txt
diff options
context:
space:
mode:
authorStefan Behnel <scoder@users.berlios.de>2011-06-29 07:53:46 +0200
committerStefan Behnel <scoder@users.berlios.de>2011-06-29 07:53:46 +0200
commit6e411fd37e85e913d8b025bbddf5fb0a26ae90d4 (patch)
tree79965e72c2edf89b2bfe167a358556eeb6da85de /doc/tutorial.txt
parentc5c8cae024a543205c55e09af832c1bf528d2a0d (diff)
downloadpython-lxml-6e411fd37e85e913d8b025bbddf5fb0a26ae90d4.tar.gz
tutorial comment on multiple namespaces in E-factory
Diffstat (limited to 'doc/tutorial.txt')
-rw-r--r--doc/tutorial.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/tutorial.txt b/doc/tutorial.txt
index 8e1f29d6..0576108f 100644
--- a/doc/tutorial.txt
+++ b/doc/tutorial.txt
@@ -1201,6 +1201,13 @@ simple vocabulary for an XML language:
One such example is the module ``lxml.html.builder``, which provides a
vocabulary for HTML.
+When dealing with multiple namespaces, it is good practice to define
+one ElementMaker for each namespace URI. Again, note how the above
+example predefines the tag builders in named constants. That makes it
+easy to put all tag declarations of a namespace into one Python module
+and to import/use the tag name constants from there. This avoids
+pitfalls like typos or accidentally missing namespaces.
+
ElementPath
===========