/// <summary>
 ///  Parses style information by reading from the given file. That parsing will
 ///  attempt to preserve line-information to provide better error messages.
 /// </summary>
 /// <param name="p">The style parser instance</param>
 /// <param name="file">The file name of the XML document to read.</param>
 /// <param name="loadOptions">Defaults to preserve line-info and base-uri for cleaner error messages</param>
 /// <returns></returns>
 public static List <IStyleRule> ReadFile(this IStyleParser p, string file, LoadOptions loadOptions = LoadOptions.SetLineInfo | LoadOptions.SetBaseUri)
 {
     return(p.Read(XDocument.Load(file, loadOptions)));
 }
 /// <summary>
 ///  Parses style information from the given xml string. That parsing will
 ///  attempt to preserve line-information to provide better error messages.
 /// </summary>
 /// <param name="p">The style parser instance</param>
 /// <param name="xmltext">The style document as well-formed XML text.</param>
 /// <param name="loadOptions">Defaults to preserve line-info and base-uri for cleaner error messages</param>
 /// <returns></returns>
 public static List <IStyleRule> Parse(this IStyleParser p, string xmltext, LoadOptions loadOptions = LoadOptions.SetLineInfo | LoadOptions.SetBaseUri)
 {
     return(p.Read(XDocument.Load(new StringReader(xmltext), loadOptions)));
 }