aboutsummaryrefslogtreecommitdiffstats
path: root/doc/codesnippets/doc/src/snippets/code/src_corelib_xml_qxmlstream.cpp
blob: 59223dc44a1f4ef661bf81e8021ba72ceb5038f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//! [0]
xml = QXmlStreamReader()
...
while not xml.atEnd():
    xml.readNext();
    ... # do processing

if xml.hasError():
    ... # do error handling

//! [0]


//! [1]
writeStartElement(qualifiedName)
writeCharacters(text)
writeEndElement()
//! [1]


//! [2]
writeStartElement(namespaceUri, name)
writeCharacters(text)
writeEndElement()
//! [2]