PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The source XML has no mention of friends so I don't know where you'll get those <edge>s from.
If you take the nodes from any <friend> element, discard the <uid> and <name>, then do some simple numeric-or-not tests on the values from the test, you can create the <key> nodes fairly easily. Then for each <node> and <data>, you just run a loop over all the <friend> nodes and extract the node types that you got earlier (when you created the <key>s).
phersonw wrote:It should be admirable that providing a example(programming) to me?
... Why yes: someone has, in fact, really been far even as decided to use even go want to do look more like.
Use something like SimpleXML to parse the XML feed. At the same time you can create the XML output.
Or you could try your hand at XSLT.
Or you could modify whatever produces the XML to produce this GraphML thing instead/too.