function XMLParser( xmlDocument )
{
	this.className = 'XMLParser';
	this.xmlDocument = xmlDocument;
}

XMLParser.prototype.getNodeValue = function( nodeName )
{
	var elements = this.xmlDocument.getElementsByTagName( nodeName );
	var contents = new Array();

	if( elements.length > 0 )
	{
		for ( i = 0; i < elements.length; i++ )
		{
			if( elements[i].hasChildNodes() )
			{
				var el = elements[i];
				
				if (el.firstChild)
				{
					if (el.firstChild.nodeName.indexOf('text') > -1)
					{
						contents = el.firstChild.nodeValue;
					}
					else
					{
						contents.push(el);
					}
				}
				else
				{
					contents.push(null);
				}
			}
		}

		return contents;
	}
	else
	{
		return null;
	}
}
