SimpleFramework.Xml.Core.CompositeKey.Write C# (CSharp) Method

Write() public method

This method is used to write the value to the specified node. The value written to the node must be a composite object and if the element map annotation is configured to have a key attribute then this method will throw an exception.
public Write ( OutputNode node, Object item ) : void
node OutputNode /// this is the node that the value is written to ///
item Object /// this is the item that is to be written ///
return void
      public void Write(OutputNode node, Object item) {
         Class expect = type.Type;
         String key = entry.Key;
         if(entry.IsAttribute()) {
            throw new ElementException("Can not have %s as an attribute", expect);
         }
         if(key == null) {
            key = context.GetName(expect);
         }
         String name = style.GetElement(key);
         root.Write(node, item, expect, name);
      }
   }