I am trying to move edge when node is positioned in svg file but since each component in svg is independent. So when I place node from one position to another then it’s edge does not get moved along with it.
Please can you suggest tools for editing svg files.
I assume you mean interactively editing an SVG (a human dragging and dropping things with the mouse) as opposed to programmatically (a script making regular changes to thousands of nodes/graphs at once).
Inkscape is pretty good, if challenging to master. It will let you do things like “group” a selection of elements so you can drag and drop them together, or “anchor” the end of a line to some other shape so that it adjusts automatically when you move the shape.
Theoretically, you could, for example, use JS to track which node was clicked and dragged, get its sibling comment <!-- A -->, search for comments in svg for which edges this name is associated with (<!-- A--B -->) and move these edges <g id="edge1" class="edge">, but I don’t know the production ready solution. There is something similar here: graphysics.
If you have saved the original DOT file from which the SVG is produced, you can load this DOT file into a program for visual editing and after editing save result in SVG or in a DOT, maybe QVGE can do this, but I have not used it.