MCPcopy Create free account
hub / github.com/KDE/labplot / skipToEndElement

Method skipToEndElement

src/backend/lib/XmlStreamReader.cpp:140–161  ·  view source on GitHub ↗

! * Go to the end element tag of the current element * If the end of the document is reached, an error is raised. * \return false if end of document reached, otherwise true */

Source from the content-addressed store, hash-verified

138 * \return false if end of document reached, otherwise true
139 */
140bool XmlStreamReader::skipToEndElement() {
141 int depth = 1;
142 if (atEnd()) {
143 raiseError(i18n("unexpected end of document"));
144 return false;
145 }
146
147 do {
148 readNext();
149 if (isEndElement())
150 depth--;
151 if (isStartElement())
152 depth++;
153 } while (!((isEndElement() && depth == 0) || atEnd()));
154
155 if (atEnd()) {
156 raiseError(i18n("unexpected end of document"));
157 return false;
158 }
159
160 return true;
161}
162
163/*!
164 * Read an XML attribute and convert it to int

Callers 15

loadMethod · 0.80
XmlReadMaskMethod · 0.80
loadMethod · 0.80
Folder.cppFile · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80
loadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected