diff options
author | David Boddie <david.boddie@nokia.com> | 2011-04-27 16:12:16 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-04-28 17:39:44 (GMT) |
commit | 88ba4be3359f52ed22a5dfc60b4fc9b14c37878e (patch) | |
tree | bf26e21ff553e825c52d7ddcaa157b537cc13c55 /src/corelib/xml | |
parent | 3abaecc3aec4e46f1c5969c33875fd45aa542385 (diff) | |
download | Qt-88ba4be3359f52ed22a5dfc60b4fc9b14c37878e.zip Qt-88ba4be3359f52ed22a5dfc60b4fc9b14c37878e.tar.gz Qt-88ba4be3359f52ed22a5dfc60b4fc9b14c37878e.tar.bz2 |
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.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp index 2ef0386..e19a498 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. |