
Originally Posted by
norobro
Edit: I'm lacking a bit of sleep on this so what I said previously in this post is kinda off.
Maybe I'm not getting the full picture with how to use that class to read whitespace, so could you explain it a bit more?
Right now, my QDomDocument is set as private in my header and predefined. This is the code I use to load the data for retrieving my data.
void ScfEncoder
::load(QString path
) {
{
fatalExit("Failed to open input file!");
}
/* Load all data */
xmlData.setContent(structFile.readAll());
structFile.close();
// Get root
root = xmlData.documentElement();
if(root.isNull())
{
fatalExit("Root of the input XML file was not detected!");
}
}
void ScfEncoder::load(QString path)
{
QFile structFile(path);
if(!structFile.open(QIODevice::ReadOnly | QIODevice::Text))
{
fatalExit("Failed to open input file!");
}
/* Load all data */
xmlData.setContent(structFile.readAll());
structFile.close();
// Get root
root = xmlData.documentElement();
if(root.isNull())
{
fatalExit("Root of the input XML file was not detected!");
}
}
To copy to clipboard, switch view to plain text mode
I'm just asking if there is any way to retrieve whitespace from a node such as the one I provided above using any existing methods or classes in Qt or do I have to kinda do it manually, if it's even possible?
Bookmarks