SQL テーブルからデータを取得して、カスタム タグを使用して DGML を構築したいと考えています。
テーブル:
UCId UCPre UCPost UCNext
-----------------------------------------------------------------------------------------------
UC01 User must be Registerd User is Loggined sucessfully UC02
UC02 User is Loggined sucessfully User is added UC03
UC03 File must be selected File is added NULL
UC04 File is added File is deleted NULL
UC05 User is Loggined sucessfully User is deleted NULL
ノードに次のタグを含む xml が必要です UCID 列と UCNext 列から UCId を読み取りたい
<?xml version="1.0" encoding="utf-8"?>
<DirectedGraph Title="TestT" xmlns="http://schemas.microsoft.com/vs/2009/dgml">
<Nodes>
<Node Id="UC01" Label="UC01" />
<Node Id="UC02" Label="UC02" />
<Node Id="UC03" Label="UC03" />
</Nodes>
UC01として表の上記のデータに基づいてノード間のリンクを作成したい次の状態はUC02です.ノード間に正しいリンクが作成されるようにコーディングしてこれを設定するにはどうすればよいですか
<Links>
<Link Source="UC01" Target="UC02" Label="1"/>
<Link Source="UC02" Target="UC03" Label="2" />
</Links>
<Properties>
<Property Id="Background" Label="Background" Description="The background color" DataType="System.Windows.Media.Brush" />
<Property Id="Bounds" DataType="System.Windows.Rect" />
<Property Id="Label" Label="Label" Description="Displayable label of an Annotatable object" DataType="System.String" />
<Property Id="LabelBounds" DataType="System.Windows.Rect" />
<Property Id="Stroke" DataType="System.Windows.Media.Brush" />
<Property Id="Title" DataType="System.String" />
<Property Id="UseManualLocation" DataType="System.Boolean" />
</Properties>
</DirectedGraph>
C#またはJavaでこれを行うにはどうすればよいですか?