在节点之间显示文本

Hi i have this xml structure with text between my tag :

<content>
    <line>Lorem ipsum dolor sit amet, consetetur sadipscing elitr<link>3</link></line>
</content>
<content>
    <line>hendrerit in vulputate velit esse</line>
</content>
<content>
    <line><bold>iriure dolor</bold>in hendrerit in vulputate velit esse molestie consequat</line>
</content>

I need to get this result :

<p>
    <span>Lorem ipsum dolor sit amet, consetetur sadipscing elitr<a href=''>3</a></span>
</p>
<p>
    <span>hendrerit in vulputate velit esse</span>
</p>
<p>
    <span><b>iriure dolor</b>in hendrerit in vulputate velit esse molestie consequat</span>
</p>

But i get this result :

<p>
    <span><a href=''>3</a></span>
</p>
<p>
    <span>hendrerit in vulputate velit esse</span>
</p>
<p>
    <span><b>iriure dolor</b></span>
</p>

how do I do?

Below is a stylesheet that produces the output you need. It is impossible to say whether this is of any use to you because you did not say whether your attempted solution uses PHP or simply invokes an XSLT stylesheet.

Your input XML is not well-formed, the stylesheet assumes this input:

Input XML

<root>
    <content>
    <line>Lorem ipsum dolor sit amet, consetetur sadipscing elitr<link>3</link></line>
</content>
<content>
    <line>hendrerit in vulputate velit esse</line>
</content>
<content>
    <line><bold>iriure dolor</bold>in hendrerit in vulputate velit esse molestie consequat</line>
</content>
</root>

Stylesheet

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 

    <xsl:output method="xml" indent="yes"/>

    <xsl:template match="/root">
        <xsl:copy>
            <xsl:apply-templates/>
        </xsl:copy>
    </xsl:template>

    <xsl:template match="content">
        <p>
            <xsl:apply-templates/>
        </p>
    </xsl:template>

    <xsl:template match="line">
        <span>
            <xsl:apply-templates/>
        </span>
    </xsl:template>

    <xsl:template match="link">
        <a href="">
            <xsl:apply-templates/>
        </a>
    </xsl:template>

    <xsl:template match="bold">
        <b>
            <xsl:apply-templates/>
        </b>
    </xsl:template>

</xsl:stylesheet>

XML Output

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <p>
      <span>Lorem ipsum dolor sit amet, consetetur sadipscing elitr<a href="">3</a>
      </span>
   </p>
   <p>
      <span>hendrerit in vulputate velit esse</span>
   </p>
   <p>
      <span>
         <b>iriure dolor</b>in hendrerit in vulputate velit esse molestie consequat</span>
   </p>
</root>