Finder.Areas.HelpPage.HelpPageSampleGenerator.TryFormatXml C# (CSharp) 메소드

TryFormatXml() 개인적인 메소드

private TryFormatXml ( string str ) : string
str string
리턴 string
        private static string TryFormatXml(string str)
        {
            try
            {
                XDocument xml = XDocument.Parse(str);
                return xml.ToString();
            }
            catch
            {
                // can't parse XML, return the original string
                return str;
            }
        }