![]() |
Add xml elements to existing xml file
Normally this shouldn't be a big problem, to add more xml elements in the middle of an already existing xml file. But the problem is that it's an Word xml file which uses Office Open Xml. The problem is that I can't use the normal methods with DOMDocument cause it uses namespaces. So I tried simplexml, but then I couldn't add it in the middle of the text where I needed it but only at the end of the file.
This is a small part of the xml file Code:
<w:p w:rsidR="000D7961" w:rsidRPr="000D7961" w:rsidRDefault="000D7961" w:rsidP="000D7961">Code:
<w:pPr> |
To create namespaced elements, use the DOMDocument::createElementNS method.
|
I tried it, but I already have a namespace, so why do I need to create a new one?
This is the current code I have: PHP Code:
Quote:
PHP Code:
PHP Code:
|
| All times are GMT. The time now is 04:03 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0