GoXml Transformer in VB.NET

I found this code in forum:

internal class SimpleXmlTransformBasicNode : GoXmlTransformer {

public SimpleXmlTransformBasicNode() {

this.TransformerType = typeof(GoBasicNode);

this.ElementName = “node”;

this.IdAttributeUsedForSharedObjects = true;

}



public override void GenerateAttributes(Object obj) {

base.GenerateAttributes(obj);

GoBasicNode n = (GoBasicNode)obj;

WriteAttrVal(“spot”, n.LabelSpot);

WriteAttrVal(“label”, n.Text);

WriteAttrVal(“loc”, n.Location);

}



public override Object Allocate() {

GoBasicNode n = new GoBasicNode();

// you might want to do other common initialization here

return n;

}



public override void ConsumeAttributes(Object obj) {

base.ConsumeAttributes(obj);

GoBasicNode n = (GoBasicNode)obj;

n.LabelSpot = Int32Attr(“spot”, GoObject.Middle);

n.Text = StringAttr(“label”, “”);

n.Location = PointFAttr(“loc”, new PointF(100, 100));

}

}



Can you help me to translate it in VB.NET.



I tried but I have some problems to understand all functions particularly this one:



xw.AddTransformer(New SimpleXmlTransformBasicNode())



I have this error:

I suggest you search the SamplesVB directories for examples written in VB.