Answer the question
In order to leave comments, you need to log in
Import from php to xml?
I can't add gurl and gname nested in item each... Tell me
how to add.
header("Content-type: text/xml; charset=utf-8");
$dom = new DOMDocument('1.0','utf-8');
$root = $dom->createElement('rss');
$dom->appendChild($root);
$title = $dom->createElement('title', 'test');
$root->appendChild($title );
$link = $dom->createElement('link', 'test');
$root->appendChild($link );
$description = $dom->createElement('description', 'test');
$root->appendChild($description );
while($arElement = $rsElements->GetNext())
{
$url =$dom->createElement("gurl", $surl.$arElement[DETAIL_PAGE_URL]);
$root->appendChild($url );
$name = $dom->createElement("gname", $arElement[NAME]);
$root->appendChild($name );
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question