xml - XSLT transformation: flattening nested node based on its attribute value -
i want flatten xml file using xslt. example (there number of node , edge nodes): input: <?xml version="1.0" encoding="utf-8"?> <graphml xmlns="http://graphml.graphdrawing.org/xmlns"> <graph> <node id="0"> <data key="label">a</data> <data key="tag1">0</data> <data key="tag2">0</data> </node> <edge id="0" source="0" target="1"> <data key="label">referenced_to</data> </edge> </graph> </graphml> desired output: <?xml version="1.0" encoding="utf-8"?> <graphml xmlns="http://graphml.graphdrawing.org/xmlns"> <graph> <node id="0" label="a"> <data key="tag1">0</data> <data key="tag2">0<...