private MarshalUol ToMarshalUol(XmlNode xmlRef) { MarshalUol muol = new MarshalUol(); XmlNode xmlNode; xmlNode = xmlRef.SelectSingleNode("url"); if (xmlNode != null) { muol.Url = xmlNode.InnerText; } xmlNode = xmlRef.SelectSingleNode("key"); if (xmlNode != null) { muol.Key = xmlNode.InnerText; } xmlNode = xmlRef.SelectSingleNode("id"); if (xmlNode != null) { muol.Id = xmlNode.InnerText; } xmlNode = xmlRef.SelectSingleNode("type"); if (xmlNode != null) { muol.Type = xmlNode.InnerText; } return(muol); }
public XmlNode SerializeToXmlNode(XmlDocument xmlDoc, MarshalUol muol) { XmlNode xml = xmlDoc.CreateElement("uol"); XmlNode xmlValue = xmlDoc.CreateElement("url"); xmlValue.InnerText = muol.Url; xml.AppendChild(xmlValue); xmlValue = xmlDoc.CreateElement("key"); xmlValue.InnerText = muol.Key; xml.AppendChild(xmlValue); xmlValue = xmlDoc.CreateElement("id"); xmlValue.InnerText = muol.Id; xml.AppendChild(xmlValue); xmlValue = xmlDoc.CreateElement("type"); xmlValue.InnerText = muol.Type; xml.AppendChild(xmlValue); return(xml); }