public static AnySqlDataFeed.XML.Service GetSerializationData(System.Uri url) { AnySqlDataFeed.XML.Service ser = new AnySqlDataFeed.XML.Service(); ser.Base = "http://*****:*****@" SELECT TABLE_SCHEMA AS table_schema ,TABLE_NAME AS table_name FROM INFORMATION_SCHEMA.TABLES WHERE (1=1) AND table_schema NOT IN( 'information_schema', 'pg_catalog') AND TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME LIKE 't\_%' ESCAPE '\' ORDER BY TABLE_SCHEMA, TABLE_NAME "; using (System.Data.DataTable dt = SQL.GetDataTable(strSQL)) { foreach (System.Data.DataRow dr in dt.Rows) { string tableName = System.Convert.ToString(dr["table_name"]); ser.Workspace.Collection.Add( new AnySqlDataFeed.XML.Collection() { Title = tableName , Href = tableName } ); } // Next dr } // End Using System.Data.DataTable dt return(ser); }
public static void SerializeToFile(System.Uri url) { AnySqlDataFeed.XML.Service ser = GetSerializationData(url); Tools.XML.Serialization.SerializeToXml(ser, @"d:\myatomtext.xml"); }
public static string Serialize(System.Uri url) { AnySqlDataFeed.XML.Service ser = GetSerializationData(url); return(Tools.XML.Serialization.SerializeToXml(ser)); }