From 20fce65973531cdf27538ccad71a8e82d1b49892 Mon Sep 17 00:00:00 2001 From: scoder Date: Fri, 1 Feb 2008 12:34:34 +0100 Subject: [svn r3237] r3378@delle: sbehnel | 2008-02-01 12:33:42 +0100 explain different return values of fromstring() and parse() --HG-- branch : trunk --- doc/tutorial.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/tutorial.txt') diff --git a/doc/tutorial.txt b/doc/tutorial.txt index c0ef4591..c63d9dd0 100644 --- a/doc/tutorial.txt +++ b/doc/tutorial.txt @@ -602,6 +602,10 @@ the string parser functions:: >>> print etree.tostring(root) data +The reasoning behind this difference is that ``parse()`` returns a +complete document from a file, while the string parsing functions are +commonly used to parse XML fragments. + The ``parse()`` function supports any of the following sources: * an open file object -- cgit v1.2.1