src/Arrays/Conversions/From/Dom.php
private function FromDom($domNode)
	{
		$domArray = array();
		if($domNode->nodeType == XML_TEXT_NODE)
		{
			$domArray = trim($domNode->nodeValue);
		}
		else
		{
			if($domNode->hasAttributes())
			{
				$attributes = $domNode->attributes;
				if(!is_null($attributes))
				{
					$domArray['@attr'] = array();
					foreach ($attributes as $index=>$attr)
					{
						$domArray['@attr'][$attr->name] = $attr->value;
					}
				}
			}
			if($domNode->hasChildNodes())
			{
				$children = $domNode->childNodes;
				for($i=0;$i<$children->length;$i++)
				{
					$child = $children->item($i);
					$domArray[$child->nodeName.'_'.$i] = $this->FromDom($child);
				}
			}
		}
		return $domArray;
	}
private function FromDom($domNode)
	{
		$domArray = array();
		if($domNode->nodeType == XML_TEXT_NODE)
		{
			$domArray = trim($domNode->nodeValue);
		}
		else
		{
			if($domNode->hasAttributes())
			{
				$attributes = $domNode->attributes;
				if(!is_null($attributes))
				{
					$domArray['@attr'] = array();
					foreach ($attributes as $index=>$attr)
					{
						$domArray['@attr'][$attr->name] = $attr->value;
					}
				}
			}
			if($domNode->hasChildNodes())
			{
				$children = $domNode->childNodes;
				for($i=0;$i<$children->length;$i++)
				{
					$child = $children->item($i);
					$domArray[$child->nodeName.'_'.$i] = $this->FromDom($child);
				}
			}
		}
		return $domArray;
	}
Method: FromDom
=========================================================================
This is a recursive function that will iterate through the DOM Nodes
to create the array for easier inspection and manipulation.

Parameters:
-------------------------------------------------------------------------
$domNode - A DOM Node to convert to an array

Returns:
-------------------------------------------------------------------------
array