How to add more element with PHP XMLWriter? -
my code:
$writer = new xmlwriter(); $writer->openuri('data.xml'); $writer->startdocument('1.0','utf-8'); $writer->startelement("cont"); $writer->writeelement('product', $produto); $writer->writeelement('price', $preco); $writer->enddocument(); $writer->flush(); output:
product: cd price: 10,00 how add element without deleting last element?
i want xml return.
product: cd2 price: 20,00 product: cd price: 10,00 product...
Comments
Post a Comment