XML adds prefix on cloneNode

202
February 10, 2018, at 03:08 AM

I'm doing some XML transformations with PHP.

I need to move some of the nodes inside of other new node. I'm creating a node array of all elements (cloneNode and then push to the array) that need to be moved, deleting them from the xml document, create a new element and after that re-inserting them. Everything looks perfect to the moment I have default prefix on my object. Here is simple example what's my input

<div class="my class">
    <myobject xmlns="someNameSpace" class="file">
        <mySubObject ......./>
    </myobject>
</div>

and the output is

<div class="my class">
    <default:myobject  xmlns="someNameSpace" class="file">
         <default:mySubObject ......./>
    </default:myobject>
</div>

"someNameSpace" is included in the master xmlns

 <xs:import namespace="someNameSpace" schemaLocation="path/to/the/someNameSpace.xsd" />

Have no idea how I can clean it up, or why I'm getting this "default" front of the "myobject"

READ ALSO
Wordpress - Filtered function

Wordpress - Filtered function

How do I write a WordPress custom function that will fire on particular post categories?

153
Hide Select Arrows [on hold]

Hide Select Arrows [on hold]

I can not remove the arrows from the selectors

200
How do I get make my PHP and SQL site live? [on hold]

How do I get make my PHP and SQL site live? [on hold]

I have created a site/webapp that I currently have on localhost via XAMPPMy site/webapp is made up of -html -css -javascript -php -sql (written into the php)

152
music player like radiojavan.com [on hold]

music player like radiojavan.com [on hold]

i am designing a wordpress theme now i want this in single When the song is over automatically go to next post of that category

176