Beispiel #1
0
 private static XElement ConvertToXml(object xml)
 {
     if (null == xml)
     {
         return(XElement.Parse("<stub/>"));
     }
     if (xml is SqlXml)
     {
         return(XElement.Load((xml as SqlXml).CreateReader()));
     }
     if (xml is SqlString)
     {
         var str = (SqlString)xml;
         if (str.Value.StartsWith("<"))
         {
             return(XElement.Parse(str.Value));
         }
         var result = MyBxl.Parse(str.Value);
         if (result.Elements().Count() == 1)
         {
             return(result.Elements().First());
         }
         return(result);
     }
     return(XElement.Parse("<stub/>"));
 }
Beispiel #2
0
 public static SqlXml BxlToXml(SqlString bxlcode)
 {
     if (bxlcode.IsNull)
     {
         return(SqlXml.Null);
     }
     return(new SqlXml(MyBxl.Parse(bxlcode.Value).CreateReader()));
 }
        protected override object process()
        {
            var project = new SingleContentProject(Text);

            if (ProjBxl.hasContent())
            {
                project.ConfigureFromXml(MyBxl.Parse(ProjBxl));
            }
            return(new ThemaCompilerResultForQweb(
                       LastContext = new ThemaCompiler().Compile(
                           project)));
        }