<title><![CDATA[ hello ]]></title> <link>http://www.google.com</link> <description><img class="img" src="http://google.com/a.jpg" alt="" /></a>]]></description> <title><![CDATA[ world ]]></title> <link>http://www.google.com</link> <description><img class="img" src="http://google.com/b.jpg" alt="" /></a>]]></description> <title><![CDATA[ merhaba ]]></title> <link>http://www.google.com</link> <description><img class="img" src="http://google.com/c.jpg" alt="" /></a>]]></description>
preg_replace ile olur diye düşünüyordum ama yapamadım sanırım xml parser ile oluyormuş. title'daki yazıyı yani;
<title><![CDATA[
ile
]]></title>
arasında kalan kısmı alıp ondan sonraki gelen ilk alt attiribute'une yerleştirmek istiyorum...
yani çıktı şöyle olacak
<title><![CDATA[ hello ]]></title> <link>http://www.google.com</link> <description><img class="img" src="http://google.com/a.jpg" alt="hello" /></a>]]></description> <title><![CDATA[ world ]]></title> <link>http://www.google.com</link> <description><img class="img" src="http://google.com/b.jpg" alt="world" /></a>]]></description> <title><![CDATA[ merhaba ]]></title> <link>http://www.google.com</link> <description><img class="img" src="http://google.com/c.jpg" alt="merhaba" /></a>]]></description>
bunun için ne gibi şeyler yapmam gerekebilir?
Teşekkür ederim.