Organizational Research By

Surprising Reserch 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
5 views



Related Hot Questions

2 Answers

0 votes
NULL
answered Oct 11, 2015 by suyesh.lokhande
0 votes
NULL
answered Oct 11, 2015 by vimaldas2005

...