#!/usr/bin/env python2

import xml.dom.minidom
from sys import argv


class PyRssConf:
	def __init__(self, config="/etc/ejabberd/pyrss.xml"): self.dom=xml.dom.minidom.parse(config)
	def dbhost(self): return self.dom.getElementsByTagName("dbhost")[0].childNodes[0].data
	def dbuser(self): return self.dom.getElementsByTagName("dbuser")[0].childNodes[0].data
	def database(self): return self.dom.getElementsByTagName("database")[0].childNodes[0].data
	def dbpassword(self): return self.dom.getElementsByTagName("dbpassword")[0].childNodes[0].data

