private XElement ToXElement()
        {
            var producer = new ForwardXElementProducer();
            var creator = new DynamicForwardXmlCreator(producer);
            Accept(creator);

            return producer.ToXElement();
        }
Ejemplo n.º 2
0
        public string ToXml()
        {
            var stringBuilder = new StringBuilder();
            var creator =
                new DynamicForwardXmlCreator(
                    new ForwardXmlStringProducer(new PrettyPrintStringXmlBuilder(new StringXmlBuilder(stringBuilder),
                        stringBuilder)));
            Accept(creator);

            return creator.ToString();
        }