Expand|Select|Wrap|Line Numbers
- <shops>
- <fashion>
- <shirt>
- <product>
- <soort>A</soort>
- <link>B</link>
- </product>
- </shirt>
- <pants>
- <product>
- <soort>E</soort>
- <link>F</link>
- </product>
- </pants>
- </fashion>
- </shops>
PHP4:
Expand|Select|Wrap|Line Numbers
- $xml = domxml_open_file('shop.xml');
- $newproduct = $xml->fashion->shirt->create_element("product");
- $newproduct->append_child("soort","aaaaa");
- $newproduct->append_child("link","bbbbb");
- $a = $xml->append_child($newproduct);
- $xml->dump_file('shop.xml');
The file is written, but nothing has been changed. Why?