Loads an HTML document into a tree of HTML nodes
| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hzDocHtml::Import | (hzString&,) |
Declared in file: hzDocument.h
Defined in file : hzDocHtml.cpp
Function Logic:
Function body:
hzEcode hzDocHtml::Import (hzString& path)
{
// Loads an HTML document into a tree of HTML nodes
//
// Arguments: 1) path The full pathname of the file to load
//
// Returns: E_ARGUMENT If no file path is supplied
// E_NOTFOUND If the file does not exist
// E_NODATA If the file is empty
// E_OPENFAIL If the file cannot be read
// E_FORMAT If a format error caused the file load to fail
// E_OK If the operation is successful
_hzfunc("hzDocHtml::Import") ;
ifstream is ; // Input stream
hzChain Z ; // Chain for holding file content
hzEcode rc ; // Return code
// Check path and load document
rc = OpenInputStrm(is, path) ;
if (rc == E_OK)
{
Z << is ;
is.close() ;
rc = Load(Z) ;
}
return rc ;
}