+ -
当前位置:首页 → 问答吧 → 类的继承关系在用XML在网页上以图展示出来,在线等

类的继承关系在用XML在网页上以图展示出来,在线等

时间:2011-06-27

来源:互联网

有两个问题:我DLL库中有N个关系类,首先要判断这些类的相互继承关系;
然后,得之这些相互继承关系后,要用XML以图表形式展示出来,如VS2010中关系类图一样。
拜托帮忙回答下啊,只回答其中一个也可以,多谢多谢了。

作者: csuchen6   发布时间: 2011-06-27

VB.NET code

 Dim ts As System.Type = ht
                    Dim tt As System.Type = ht
                    For Each ts In type
                        For Each tt In type
                            If (ts.IsSubclassOf(tt)) Then
                                Dim xmlelem As XmlElement = xmlwriter.CreateElement("BrainData")
                                Dim Links As XmlElement = xmlwriter.CreateElement("Links")
                                xmlelem.AppendChild(Links)

                                Dim Link As XmlElement = xmlwriter.CreateElement("Link")
                                xmlelem.AppendChild(Link)

                                Dim guid As XmlElement = xmlwriter.CreateElement("guid")
                                Dim idA As XmlElement = xmlwriter.CreateElement("idA")
                                Dim idB As XmlElement = xmlwriter.CreateElement("idB")
                                xmlelem.AppendChild(guid)
                                xmlelem.InnerText = "tt_ts"
                                xmlelem.AppendChild(idA)
                                xmlelem.InnerText = "tt"
                                xmlelem.AppendChild(idB)
                                xmlelem.InnerText = "ts"

                            End If
                        Next
                    Next



我这样写的,代码完全不起作用呀,请高手赐招哦,欢迎顶帖,顶帖有分

作者: csuchen6   发布时间: 2011-06-27