Nmap\Nmap::parseOutputFile PHP Method

parseOutputFile() private method

private parseOutputFile ( $xmlFile )
    private function parseOutputFile($xmlFile)
    {
        $xml = simplexml_load_file($xmlFile);
        $hosts = array();
        foreach ($xml->host as $host) {
            $hosts[] = new Host((string) $host->address->attributes()->addr, (string) $host->status->attributes()->state, isset($host->hostnames) ? $this->parseHostnames($host->hostnames->hostname) : array(), isset($host->ports) ? $this->parsePorts($host->ports->port) : array());
        }
        return $hosts;
    }