summaryrefslogtreecommitdiffstats
path: root/src/corelib/xml
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-04-27 18:12:16 +0200
committerDavid Boddie <david.boddie@nokia.com>2011-04-28 19:39:44 +0200
commit88ba4be3359f52ed22a5dfc60b4fc9b14c37878e (patch)
treebf26e21ff553e825c52d7ddcaa157b537cc13c55 /src/corelib/xml
parent3abaecc3aec4e46f1c5969c33875fd45aa542385 (diff)
Doc: Added a code snippet to clarify the use of a function.
Task-number: QTBUG-18888
Diffstat (limited to 'src/corelib/xml')
-rw-r--r--src/corelib/xml/qxmlstream.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp
index 2ef03863b7..e19a49878c 100644
--- a/src/corelib/xml/qxmlstream.cpp
+++ b/src/corelib/xml/qxmlstream.cpp
@@ -646,6 +646,11 @@ QXmlStreamReader::TokenType QXmlStreamReader::tokenType() const
parser has reached the end element, the current element becomes the parent
element.
+ You can traverse a document by repeatedly calling this function while
+ ensuring that the stream reader is not at the end of the document:
+
+ \snippet doc/src/snippets/xml/streamreader/traverse.cpp traverse document
+
This is a convenience function for when you're only concerned with parsing
XML elements. The \l{QXmlStream Bookmarks Example} makes extensive use of
this function.