Обыскал пол-инета, но точный ответ так и не нашёл.
for (QDomNode n = head.firstChild(); !n.isNull(); n = n.nextSibling())
{ ... }
Гарантируется ли DOM xml, что порядок прохождения нод будет соответствовать порядку их следования в докуенте?
Нашёл в справке по Qt:
QDomNode QDomNode::nextSibling () const
Returns the next sibling in the document tree. Changing the returned node will also change the node in the document tree.
If you have XML like this:
<h1>Heading</h1>
<p>The text...</p>
<h2>Next heading</h2>
and this QDomNode represents the <p> tag, nextSibling() will return the node representing the <h2> tag.
но про стандарт всё равно интересно, товарищи знатоки!
Здравствуйте, Vines, Вы писали:
V>Обыскал пол-инета, но точный ответ так и не нашёл.
V>for (QDomNode n = head.firstChild(); !n.isNull(); n = n.nextSibling())
V> { ... }
V>Гарантируется ли DOM xml, что порядок прохождения нод будет соответствовать порядку их следования в докуенте?
3.2.1 Element Content:
Any content particle in a choice list may appear in the element content at the location where the choice list appears in the grammar; content particles occurring in a sequence list MUST each appear in the element content in the order given in the list.
... << RSDN@Home 1.2.0 alpha 4 rev. 1048>>