I tried this code in PHP;
$oItem->appendChild($oDom->createElement("link", $iItem->item($i)->getElementsByTagName("affiliateUrl")->item(0)->nodeValue));
But it shows error
DOMDocument::createElement(): unterminated entity reference
Is this because of getElementsByTagName contain < >
?
Please advise how to fix it?
That tag is:
<affiliateUrl>http://hb.afl.rakuten.co.jp/hgc/sd0ps992.2asad607.g00ps016.2asfefe9/?pc=http%3A%2F%2Fitem.rakuten.co.jp%2Fmarukans%2Fno11-1%2F&m=http%3A%2F%2Fm.rakuten.co.jp%2Fmarukans%2Fi%2F10000152%2F</affiliateUrl>
Thank you for your help.