private function parseDbSettings(\DOMNode $db) {

		$context = $this->isLocalhost ? 'local' : 'remote';
		$xpath = new \DOMXPath($db->ownerDocument);

		$d = $xpath->query("db_connection[@context='$context']", $db);
		
		if(!$d->length) {
			$d = $db->getElementsByTagName('db_connection');
		}

		if($d->length) {
			$this->db = new \stdClass();

			foreach($d->item(0)->childNodes as $node) {

				if($node->nodeType !== XML_ELEMENT_NODE) {
					continue;
				}

				$v = trim($node->nodeValue);
				$k = $node->nodeName;

				$this->db->$k = $v;

			}
		}

	}