Saving/Loading Custom properties in XML

Hi,
I am trying to save custom user entered inputs to a Iconic nodes in xml to give me an output as below and try and read the same next time when user tries to load the xml.



abc
abc
abc
abc




Any help is really appreciated.
Thanks.

Do you want precisely that XML?

There’s no info on node location, or the icon…

Here is sample XML output from the Processor sample, which uses GoIconicNode:

The fact that your <port … > matches this makes me think that’s where you started…

OK… try these modifications to the Process XML code

public void Store(Stream file) {
  GoXmlWriter writer = new GoXmlWriter();
  writer.RootElementName = <font color="#ff0000">"CDDN.Processors.Uniform";</font>

public class TransformActivityNode : GoXmlTransformer {
public TransformActivityNode() {
this.TransformerType = typeof(ActivityNode);
this.ElementName = “Account”;
this.IdAttributeUsedForSharedObjects = true;
this.GeneratesPortsAsChildElements = true;
this.BodyConsumesChildElements = true;
}

<font color="#ff0000">public override void GenerateBody(object obj) {</font>

base.GenerateBody(obj);
ActivityNode node = obj as ActivityNode;
if (node != null) {
WriteStartElement(“UserInput”);
WriteStartElement(“ColumnName”);
WriteTextBody(“abc”);
WriteEndElement();
WriteEndElement();
}
}

will give you:

<CDDN.Processors.Uniform>




abc


</CDDN.Processors.Uniform>

I’ll leave the override of “public override void ConsumeBody(Object obj)” up to you. There is a sample of one in NodeLinkDemo, although you should just need to handle the stuff.