how can i add namespace name before a attribute of newly created tag,like
<Data ss:Type="String">this the value of data</Data>
but can create only
<Data Type="String">this the value of data</Data>
so i can not add “ss:” before atttbute.
Thanks in Advance
Have Dream Day
In the SimpleXml PHP manual someone gave a good example in the comments section.
Here is how I got it to work.
Say you have the following XML in a file xml.php:
You can read in this file and add the attributes you want by using XPath.
This is the output I get: