}
DocumentFragment frag = null;
long startTime = System.currentTimeMillis();
Source input = null;
try {
input = this.resolver.resolve(fileName);
DOMBuilder builder = new DOMBuilder();
builder.startDocument();
builder.startElement("", "sunShine", "sunShine", this.emptyAttributes);
IncludeXMLConsumer filter = new IncludeXMLConsumer(builder, builder);
input.toSAX(filter);
builder.endElement("", "sunShine", "sunShine");
builder.endDocument();
// Create Document Fragment
final Document doc = builder.getDocument();
frag = doc.createDocumentFragment();
final Node root = doc.getDocumentElement();
Node child;
while (root.hasChildNodes() == true) {
child = root.getFirstChild();
child.normalize();
root.removeChild(child);
frag.appendChild(child);
}
} finally {
if (input != null) input.recycle();
input = null;
}
if (this.getLogger().isDebugEnabled() == true) {