0
我想通過從SQL表中獲取數據來構建帶有自定義標記的DGML。如何通過從SQL表獲取數據來製作帶有custome標記xml文件的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
我想在節點下面的標籤我想從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>
我想要的節點之間的鏈接的XML在作爲TABEL以上UC01數據的基礎上,下一狀態是UCO 2。如何我可以設置此通過編碼使得正確鏈路節點之間創建
<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來實現這一點請幫忙?通過所有記錄循環創建節點: