Is this request related to yEd, the free diagram editor? If so, can you please explain what you mean by "id of the source and target attr's" and "expanding nodes as necessary"?