From 716958c6acb77f4f63cc6f99d741fe0a901a25ba Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 8 Jul 2014 14:06:47 +0200 Subject: Added ResultNodeFacade constructor overload for root nodes * the common use case of ResultNodeFacade inside external function implementations is managing the result root node ** this root node can be fetched through the xercesc::DOMDocument instance ** the new alias overload automatically fetches the root node pointer and as such doesn't require a root node parameter * changed external function implementations accordingly --- src/function/read_file.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/function/read_file.cc') diff --git a/src/function/read_file.cc b/src/function/read_file.cc index cb1e57f..dcd32b7 100644 --- a/src/function/read_file.cc +++ b/src/function/read_file.cc @@ -65,11 +65,7 @@ DomDocumentCache::document_ptr FunctionReadFile::constructDocument( DomDocumentCache::createDocument() ); - xercesc::DOMNode* const rootNode( - domDocument->getDocumentElement() - ); - - ResultNodeFacade result(domDocument.get(), rootNode, "file"); + ResultNodeFacade result(domDocument.get(), "file"); result.setAttribute("path", filePath.string()); if ( boost::filesystem::is_regular_file(filePath) ) { -- cgit v1.2.3