function Text_Node(nodeXml)
{
    Text_Node.superclass.constructor.call(this);
    
    var oDiv = Rup.create('div');
    
    this._setBaseElement(oDiv);
    
    var sContentXml = nodeXml.getAttribute('content');
    
    oDiv.innerHTML = sContentXml.replace(/<Link([^>]*)\/>/gi, '<span class="Text_Node_Link" $1></span>');
    
    var aSpans = oDiv.getElementsByTagName('span');
    for( var i = aSpans.length - 1; 0 <= i ; i-- )
    {
    	var oCurSpan = aSpans[i];
    	if( oCurSpan.className != 'Text_Node_Link' )
    	{
    	   continue; 
    	}
    	
    	var sMode = oCurSpan.getAttribute('mode');
    	var iDefaultMode = LINK_GO;
    	
    	if( sMode == 'new' )
    	{
    		iDefaultMode = LINK_WINDOW;
    	}
    	
    	if( sMode == 'include' )
    	{
    		iDefaultMode = LINK_APPEND;
    	}
    	
    	var oLink = Rup.app.getLink({
    	   text: oCurSpan.getAttribute('text'),
    	   typeId: oCurSpan.getAttribute('arc'),
    	   nodeId: oCurSpan.getAttribute('id'),
    	   mode: 'doc',
    	   defaultMode: iDefaultMode
    	});
    	oCurSpan.parentNode.replaceChild(oLink.dom(), oCurSpan);
    }
    
    /*
    var oContentXml;
    
    try //Internet Explorer
    {
        oContentXml = new ActiveXObject("Microsoft.XMLDOM");
        oContentXml.async = "false";
        oContentXml.loadXML(sContentXml);
    }
    catch(e)
    {
        try //Firefox, Mozilla, Opera, etc.
        {
            var parser = new DOMParser();
            oContentXml = parser.parseFromString(sContentXml,"text/xml");
        }
        catch( e )
        {
        	alert(e.message);
        }
    }
    
    var aLinks = oContentXml.getElementsByTagName('Link');
    while( aLinks.length )
    {
    	var oLink = aLinks[0];
    	var oH1 = Rup.create('h1');
    	oH1.innerHTML = 'test';
    	oLink.parentNode.replaceChild(oH1, oLink);
    }
    */
    
    oDiv.className = nodeXml.getAttribute('style');
}

Rup.extend(Text_Node, Element_Abstract);

Text_Node.prototype.getContent = function()
{
    return this._baseElement.innerHTML;
}