0
과 다른 것으로이 내 기본 XML 구조 노드를 넣어SimpleXML을
<Module_Files>
<Category name="categorie1">
<file lan="fr>
<title> .... </title>
<path> .... </path>
</file>
</Category>
</Module_Files>
을하지만
을 할 수 없습니다이 내 코드 :
$xmlFile->xpath("//Category[@name='" . $categoryName . "']"); //$categoryName = "categorie1"
$nodeFile = $xmlFile->addChild("file", "");
$nodeFile->addAttribute("lang", (string) $data["lang"]);
$nodeFile->addChild("titre", (string) $data["titre"]);
$nodeFile->addChild("path", (string) $data["path"]);
이 코드는 다음과 같이 .. 카테고리 노드 후하지에 파일 노드를 추가 :
<Module_Files>
<Category name="categorie1">
</Category>
<file lan="fr>
<title> .... </title>
<path> .... </path>
</file>
</Module_Files>
어떻게 분류 노드에 파일의 노드를 위해 무엇을 할 수 있는가?
감사합니다 :) – DOZ