Close() 공개 메소드

Completes writing and returns the XML text.
public Close ( ) : string
리턴 string
예제 #1
0
        /// <summary>
        /// Encodes the object in XML.
        /// </summary>
        public static XmlElement EncodeXml(IEncodeable encodeable, ServiceMessageContext context)
        {
            // create encoder.
            XmlEncoder encoder = new XmlEncoder(context);
            
            // write body.
            encoder.WriteExtensionObjectBody(encodeable);

            // create document from encoder.
            XmlDocument document = new XmlDocument();
            document.InnerXml = encoder.Close();

            // return root element.
            return document.DocumentElement;
        }