if (empty){
- DPRINT("Node " << name <<" is empty!\n")
storageIfc_->newText(""); //myText
- storageIfc_->nodeFinished(name);
- storageIfc_->newText(""); //nextText
+ storageIfc_->nodeFinished(name);
};
if (reader_->has_value())
{
- storageIfc_->newChild("<$>");
storageIfc_->newText(reader_->get_value());
last_text = true;
}
else
{
- storageIfc_->newChild(name);
- storageIfc_->newChild("<$>");
- storageIfc_->newText(value);
- storageIfc_->nodeFinished("<$>");
+ storageIfc_->newText(""); //prevText
+ storageIfc_->newChild(name);
+ storageIfc_->newText(value);
+ storageIfc_->nodeFinished(name);
}
}
while (reader_->move_to_next_attribute());
+ storageIfc_->newText(""); //nextText
storageIfc_->nodeFinished("<@>");
}
void XMLDocShredder::processSignificantWhitespace()
{
- ustring value = reader_->get_value();
-
+ ustring value = reader_->get_value();
// each significant whitespace sequence constructs a text node
- storageIfc_->newChild("<$>");
storageIfc_->newText(value);
-
}
void XMLDocShredder::processStartDocument(const string docName)
{
// tell storage interface to construct the document name
- storageIfc_->newChild("ROOT");
+ storageIfc_->newChild("");
}
{
/* tell the storage interface that document parsing has finished, and structures
* can now be written to disk. */
- storageIfc_->nodeFinished("ROOT");
+ storageIfc_->newText("");
+ storageIfc_->nodeFinished("");
storageIfc_->parsingFinished();
}
*/
ustring value = reader_->get_value();
- storageIfc_->newChild("<$>");
storageIfc_->newText(value);
last_text = true;
- // storageIfc_->nodeFinished();
}