$Result = $objXML->xpath('AllRelease/Release/name[@rdate="'.$DATERELEASE.'"]'); if(empty($Result)){ $AllRelease = $objXML->xpath("//AllRelease"); $releas = $AllRelease[0]->prependChild2("Release"); $dat = $releas->prependChild2("name"); $dat->addAttribute("rdate",$DATERELEASE); $releas->prependChild("comment",$COMMENT); $Anime = $releas->prependChild2("Anime"); $Anime->prependChild("popup",$POPUP); $Anime->prependChild("Title",$VIDEONAME); $Anime->prependChild("VideoUrl",$dir); $objXML->asXML("MainRelease.xml"); }else{ $Anime = $objXML->xpath("//Release"); $anime = $Anime[0]->addChild("Anime"); $anime->addChild("popup",$POPUP); $anime->addChild("Title",$VIDEONAME); $anime->addChild("VideoUrl",$dir); $objXML->asXML("MainRelease.xml"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)