I am creating a fairly generic diagram control. That my client would like to use for different types of diagrams. I have created a DiagramBlock which inherits from GoTextNode, the idea is developers will inherit from that object to create their own specific node types.
That depends on whether you want that particular information to be specified in the XML file, or whether it should be the responsibility of the node class, or some combination of both.
How do I define which node class to instatiate.
XmlDocument xmlDoc = new XmlDocument();
GoXmlReader reader = new GoXmlReader();
reader.RootObject = this;
reader.UseDOM = false;
That’s specified by the value of GoXmlTransformer.TransformerType, which is typically initialized in the constructor, e.g.:
DiagramBlock block = (DiagramBlock)obj;
string BlockType = this.StringAttr("BlockType", "");