Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


php simplexml insert node at certain position


php simplexml insert node at certain position  using -'php,xml,simplexml'

say I have XML:

<root>
  <nodeA />
  <nodeA />
  <nodeA />
  <nodeC />
  <nodeC />
  <nodeC />
</root>


How do I insert "nodeB" between As and Cs? In PHP, preferably via SimpleXML? Like:

<root>
  <nodeA />
  <nodeA />
  <nodeA />
  <nodeB />
  <nodeC />
  <nodeC />
  <nodeC />
</root>

    

asked Oct 11, 2015 by amit_cmps
0 votes
4 views



Related Hot Questions



Walkin Jobs Opening



Government Jobs Opening


...