Obtainin a QDomDocument from a QDomElement (4.8)
Given a QDomElement, is there a way to obtain the QDomDocument that created it?
The first reason I ask is that when writing functions to generate DOM nodes, I always have to pass the QDomDocument to those functions as well in order to use it to create new elements, e.g.:
Code:
// doc is needed to create child nodes, e.g.
parent.appendChild(child);
// ...
}
But if there was a way to not have to pass the document, it would be a little more convenient and clean up my parameter lists a bit, e.g.:
Code:
parent.appendChild(child);
// ...
}
The second reason is that being able to do this with one function parameter would also lets me more easily do things like overload << and such, e.g.
Re: Obtainin a QDomDocument from a QDomElement (4.8)
Re: Obtainin a QDomDocument from a QDomElement (4.8)
Oops. I was stuck looking for things named "document..." or "get...", never looked in the O's...
That was so easy, thanks!!