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

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -