PageRenderTime 28ms CodeModel.GetById 2ms app.highlight 20ms RepoModel.GetById 2ms app.codeStats 0ms

/MySQLDefault.aspx.cs

https://bitbucket.org/Offroadcode/usitebuilderimporter
C# | 703 lines | 461 code | 115 blank | 127 comment | 27 complexity | 4f692b3860997d3b61233adfd34b72c3 MD5 | raw file
  1// --------------------------------------------------------------------------------------------------------------------
  2// <copyright file="MySQLDefault.aspx.cs" company="??">
  3//   Copyright
  4// </copyright>
  5// <summary>
  6//   Defines the _Default type.
  7// </summary>
  8// --------------------------------------------------------------------------------------------------------------------
  9
 10using System;
 11using System.Configuration;
 12using System.IO;
 13using System.Text;
 14using System.Web.UI;
 15
 16using MySql.Data.MySqlClient;
 17
 18/// <summary>
 19/// Default class
 20/// </summary>
 21public partial class Default : Page
 22{
 23    #region Public Methods
 24
 25    /// <summary>
 26    /// Get Templates Default Doc Type
 27    /// </summary>
 28    /// <param name="nodeid">
 29    /// The nodeid.
 30    /// </param>
 31    /// <returns>
 32    /// Node ID
 33    /// </returns>
 34    public static string GetTemplatesDefaultDocType(string nodeid)
 35    {
 36        var rtnText = string.Empty;
 37        var strSql =
 38            "SELECT cmsDocumentType.contentTypeNodeId, cmsDocumentType.templateNodeId, cmsDocumentType.IsDefault, cmsContentType.alias FROM  cmsDocumentType INNER JOIN cmsContentType ON cmsDocumentType.contentTypeNodeId = cmsContentType.nodeId where isDefault=1 and templateNodeId="
 39            + nodeid;
 40
 41        var conn = new MySqlConnection(ConfigurationManager.AppSettings["ImportDB"]);
 42        var cmd = new MySqlCommand(strSql, conn);
 43
 44        conn.Open();
 45
 46        var reader = cmd.ExecuteReader();
 47
 48        while (reader.Read())
 49        {
 50            rtnText = ": Vega.USiteBuilder.TemplateBase<uSiteBuilderImport.Web.DocumentTypes." + reader["alias"] + ">";
 51        }
 52
 53        reader.Close();
 54        conn.Close();
 55
 56        return rtnText != string.Empty ? rtnText : ": Vega.USiteBuilder.TemplateBase";
 57    }
 58
 59    /// <summary>
 60    /// The create child doc type.
 61    /// </summary>
 62    /// <param name="nodeid">
 63    /// The nodeid.
 64    /// </param>
 65    /// <param name="alias">
 66    /// The alias.
 67    /// </param>
 68    /// <param name="path">
 69    /// The path.
 70    /// </param>
 71    public void CreateChildDocType(string nodeid, string alias, string path)
 72    {
 73        // string strSQL = "SELECT [pk],[nodeId],[alias],[icon],[thumbnail],[description],[masterContentType] FROM [cmsContentType] where masterContentType=" + nodeid + " order by Alias";
 74        var strSql =
 75            "SELECT     cmsContentType.pk, cmsContentType.nodeId, cmsContentType.alias, cmsContentType.icon, cmsContentType.thumbnail, cmsContentType.description,  "
 76            + "cmsContentType.masterContentType, umbracoNode.text " + "FROM         cmsContentType INNER JOIN "
 77            + "umbracoNode ON cmsContentType.nodeId = umbracoNode.id " + "WHERE     cmsContentType.masterContentType = "
 78            + nodeid + "  ORDER BY alias";
 79
 80        var conn = new MySqlConnection(ConfigurationManager.AppSettings["ImportDB"]);
 81        var cmd = new MySqlCommand(strSql, conn);
 82
 83        conn.Open();
 84
 85        var reader = cmd.ExecuteReader();
 86
 87        while (reader.Read())
 88        {
 89            // Start file
 90            var sb = new StringBuilder();
 91
 92            this.Response.Write("Create Doc Type for child " + reader["alias"] + " (" + reader["nodeid"] + ")<br/>");
 93
 94            sb.AppendLine("using System;");
 95            sb.AppendLine("using System.Collections.Generic;");
 96            sb.AppendLine("using System.Linq;");
 97            sb.AppendLine("using System.Web;");
 98
 99            sb.AppendLine("using Vega.USiteBuilder;");
100
101            sb.AppendLine("namespace uSiteBuilderImport.Web.DocumentTypes");
102            sb.AppendLine("{");
103            sb.AppendLine();
104            sb.Append(
105                "[DocumentType(Name=\"" + reader["text"] + "\",IconUrl=\"" + reader["icon"] + "\""
106                + GetAllowedTemplates(reader["nodeid"].ToString()));
107            sb.Append(GetAllowedContentType(reader["nodeid"].ToString()));
108            sb.Append(")]");
109            sb.AppendLine();
110            sb.AppendLine("public class " + reader["alias"] + " : uSiteBuilderImport.Web.DocumentTypes." + alias);
111
112            sb.AppendLine("{");
113
114            sb.AppendLine(CreateProperties(reader["nodeid"].ToString()));
115
116            sb.AppendLine("}");
117            sb.AppendLine("}");
118
119            if (!Directory.Exists(this.Server.MapPath("DocTypes/")))
120            {
121                Directory.CreateDirectory(this.Server.MapPath("DocumentTypes/"));
122            }
123
124            using (var writer = new StreamWriter(path + reader["alias"] + ".cs"))
125            {
126                writer.Write(sb.ToString());
127            }
128
129            // Make recursive call
130            this.CreateChildDocType(reader["nodeid"].ToString(), reader["alias"].ToString(), path);
131        }
132
133        reader.Close();
134        conn.Close();
135    }
136
137    /// <summary>
138    /// Create Child Master Pages
139    /// </summary>
140    /// <param name="nodeid">
141    /// The nodeid.
142    /// </param>
143    /// <param name="parentAlias">
144    /// The parent alias.
145    /// </param>
146    public void CreateChildMasterPages(string nodeid, string parentAlias)
147    {
148        var strSql = "SELECT pk, nodeId, master, alias, design FROM cmsTemplate WHERE master =" + nodeid;
149
150        var conn = new MySqlConnection(ConfigurationManager.AppSettings["ImportDB"]);
151        var cmd = new MySqlCommand(strSql, conn);
152
153        conn.Open();
154
155        var reader = cmd.ExecuteReader();
156
157        while (reader.Read())
158        {
159            var alias = reader["alias"].ToString().Replace(" ", string.Empty);
160
161            this.Response.Write("Creating Child MasterPage: " + alias + " (" + reader["nodeId"] + ")</br>");
162
163            var sb = new StringBuilder();
164
165            // Create Master Page
166            sb.AppendLine(
167                "<%@ Master Language=\"C#\" MasterPageFile=\"~/MasterPages/" + parentAlias
168                + ".master\" AutoEventWireup=\"true\" CodeBehind=\"" + alias
169                + ".master.cs\" Inherits=\"uSiteBuilderImport.Web.MasterPages." + alias + "\" %>");
170
171            // Get Markup
172            sb.AppendLine(GetMarkUp(reader["nodeid"].ToString()));
173            using (var writer = new StreamWriter(this.Server.MapPath("MasterPages/" + alias + ".Master")))
174            {
175                writer.Write(sb.ToString());
176            }
177
178            sb.Length = 0;
179
180            // Create Code behind file
181            sb.AppendLine("using System;");
182            sb.AppendLine("using System.Collections.Generic;");
183            sb.AppendLine("using System.Linq;");
184            sb.AppendLine("using System.Web;");
185            sb.AppendLine("using System.Web.UI;");
186            sb.AppendLine("using System.Web.UI.WebControls;");
187            sb.AppendLine("namespace uSiteBuilderImport.Web.MasterPages");
188            sb.AppendLine("{");
189            sb.AppendLine("public partial class " + alias + GetTemplatesDefaultDocType(reader["nodeId"].ToString()));
190            sb.AppendLine("{");
191            sb.AppendLine(" protected void Page_Load(object sender, EventArgs e)");
192            sb.AppendLine("{");
193            sb.AppendLine("}");
194            sb.AppendLine("}");
195            sb.AppendLine("}");
196            var path = this.Server.MapPath("MasterPages/");
197
198            using (var writer = new StreamWriter(path + alias + ".Master.cs"))
199            {
200                writer.Write(sb.ToString());
201            }
202
203            this.CreateChildMasterPages(reader["nodeId"].ToString(), alias);
204        }
205
206        reader.Close();
207        conn.Close();
208    }
209
210    /// <summary>
211    /// Create Master Pages
212    /// </summary>
213    public void CreateMasterPages()
214    {
215        const string StrSql = "SELECT pk, nodeId, master, alias, design FROM cmsTemplate WHERE (master IS NULL) order by alias";
216
217        var conn = new MySqlConnection(ConfigurationManager.AppSettings["ImportDB"]);
218        var cmd = new MySqlCommand(StrSql, conn);
219
220        conn.Open();
221
222        var reader = cmd.ExecuteReader();
223
224        while (reader.Read())
225        {
226            // string alias = dr["alias"].ToString().Replace(" ", "");
227            var alias = reader["alias"].ToString();
228
229            this.Response.Write(alias + " (" + reader["nodeId"] + ")</br>");
230
231            var sb = new StringBuilder();
232
233            // Create Master Page
234            sb.AppendLine(
235                "<%@ Master Language=\"C#\" AutoEventWireup=\"true\" CodeBehind=\"" + alias
236                + ".master.cs\" Inherits=\"uSiteBuilderImport.Web.MasterPages." + reader["alias"] + "\" %>");
237
238            // Get Markup
239            sb.AppendLine(GetMarkUp(reader["nodeid"].ToString()));
240
241            // Clean MarkUp
242            if (!Directory.Exists(this.Server.MapPath("MasterPages/")))
243            {
244                Directory.CreateDirectory(this.Server.MapPath("MasterPages/"));
245            }
246
247            using (var writer = new StreamWriter(this.Server.MapPath("MasterPages/") + alias + ".Master"))
248            {
249                writer.Write(sb.ToString());
250            }
251
252            sb.Length = 0;
253
254            // Create Code behind file
255            sb.AppendLine("using System;");
256            sb.AppendLine("using System.Collections.Generic;");
257            sb.AppendLine("using System.Linq;");
258            sb.AppendLine("using System.Web;");
259            sb.AppendLine("using System.Web.UI;");
260            sb.AppendLine("using System.Web.UI.WebControls;");
261            sb.AppendLine("namespace uSiteBuilderImport.Web.MasterPages");
262            sb.AppendLine("{");
263            sb.AppendLine("public partial class " + alias + GetTemplatesDefaultDocType(reader["nodeId"].ToString()));
264            sb.AppendLine("{");
265            sb.AppendLine(" protected void Page_Load(object sender, EventArgs e)");
266            sb.AppendLine("{");
267            sb.AppendLine("}");
268            sb.AppendLine("}");
269            sb.AppendLine("}");
270
271            using (var writer = new StreamWriter(this.Server.MapPath("MasterPages/" + alias + ".Master.cs")))
272            {
273                writer.Write(sb.ToString());
274            }
275
276            this.CreateChildMasterPages(reader["nodeId"].ToString(), alias);
277        }
278
279        reader.Close();
280        conn.Close();
281    }
282
283    #endregion
284
285    #region Methods
286
287    /// <summary>
288    /// Page Load event
289    /// </summary>
290    /// <param name="sender">
291    /// The sender.
292    /// </param>
293    /// <param name="e">
294    /// The event arguments
295    /// </param>
296    protected void Page_Load(object sender, EventArgs e)
297    {
298        // Clear and create Directories
299        var path = this.Server.MapPath("MasterPages/");
300
301        if (Directory.Exists(path))
302        {
303            Directory.Delete(path, true);
304        }
305
306        Directory.CreateDirectory(path);
307
308        path = this.Server.MapPath("DocumentTypes");
309
310        if (Directory.Exists(path))
311        {
312            Directory.Delete(path, true);
313        }
314
315        Directory.CreateDirectory(path);
316
317        this.Response.Write("<br/>-------------------------------------------------------------<br/>");
318        this.Response.Write("Creating MasterPages");
319        this.Response.Write("<br/>-------------------------------------------------------------<br/><br/>");
320
321        this.CreateMasterPages();
322
323        this.Response.Write("<br/>-------------------------------------------------------------<br/>");
324        this.Response.Write("Creating DocTypes");
325        this.Response.Write("<br/>-------------------------------------------------------------<br/><br/>");
326        this.CreateDocTypes();
327
328        this.Response.Write("<br/>-------------------------------------------------------------<br/>");
329        this.Response.Write("End");
330        this.Response.Write("<br/>-------------------------------------------------------------<br/><br/>");
331    }
332
333    /// <summary>
334    /// The get allowed content type.
335    /// </summary>
336    /// <param name="nodeid">
337    /// The nodeid.
338    /// </param>
339    /// <returns>
340    /// The allowed content type.
341    /// </returns>
342    private static string GetAllowedContentType(string nodeid)
343    {
344        var strSql =
345            "SELECT  cmsContentTypeAllowedContentType.Id, cmsContentTypeAllowedContentType.AllowedId, cmsContentType.alias "
346            + "FROM cmsContentTypeAllowedContentType INNER JOIN "
347            +
348            "cmsContentType ON cmsContentTypeAllowedContentType.AllowedId = cmsContentType.nodeId where cmsContentTypeAllowedContentType.id ="
349            + nodeid;
350
351        var conn = new MySqlConnection(ConfigurationManager.AppSettings["ImportDB"]);
352        var cmd = new MySqlCommand(strSql, conn);
353
354        conn.Open();
355
356        var reader = cmd.ExecuteReader();
357        var sb = new StringBuilder();
358
359        while (reader.Read())
360        {
361            sb.Append("typeof(" + reader["alias"] + "),");
362        }
363
364        reader.Close();
365        conn.Close();
366
367        if (sb.ToString() != string.Empty)
368        {
369            return ",AllowedChildNodeTypes = new Type[] {" + sb.ToString().Remove(sb.Length - 1, 1) + "}";
370        }
371
372        return string.Empty;
373    }
374
375    /// <summary>
376    /// The get data type.
377    /// </summary>
378    /// <param name="dataTypeId">
379    /// The data type id.
380    /// </param>
381    /// <returns>
382    /// The data type.
383    /// </returns>
384    private static string GetDataType(int dataTypeId)
385    {
386        var dt = (Enums.UmbracoPropertyType)dataTypeId;
387
388        if (dt.ToString() != dataTypeId.ToString())
389        {
390            return "UmbracoPropertyType." + dt;
391        }
392
393        // Custom DataType
394        var strSql = "SELECT text FROM umbracoNode where id=" + dataTypeId;
395
396        var conn = new MySqlConnection(ConfigurationManager.AppSettings["ImportDB"]);
397        var cmd = new MySqlCommand(strSql, conn);
398
399        conn.Open();
400
401        var reader = cmd.ExecuteReader();
402        var rtnText = string.Empty;
403
404        while (reader.Read())
405        {
406            rtnText = reader["text"].ToString();
407        }
408
409        reader.Close();
410        conn.Close();
411
412        return "UmbracoPropertyType.Other, OtherTypeName=\"" + rtnText + "\"";
413    }
414
415    /// <summary>
416    /// The get default template doc type.
417    /// </summary>
418    /// <param name="nodeid">
419    /// The nodeid.
420    /// </param>
421    /// <returns>
422    /// The default template doc type.
423    /// </returns>
424    private static string GetDefaultTemplateDocType(string nodeid)
425    {
426        // At the moment this is switched off as default Doc Types is set via the allowed templates.
427        var strSql =
428            "SELECT     cmsDocumentType.contentTypeNodeId, cmsDocumentType.templateNodeId, cmsDocumentType.IsDefault, cmsContentType.alias "
429            + "FROM         cmsDocumentType INNER JOIN "
430            + "cmsContentType ON cmsDocumentType.contentTypeNodeId = cmsContentType.nodeId "
431            + "WHERE     (cmsDocumentType.IsDefault = 1) and contentTypeNodeId=" + nodeid;
432
433        var conn = new MySqlConnection(ConfigurationManager.AppSettings["ImportDB"]);
434        var cmd = new MySqlCommand(strSql, conn);
435
436        conn.Open();
437
438        var sb = new StringBuilder();
439        var reader = cmd.ExecuteReader();
440
441        while (reader.Read())
442        {
443            sb.Append(reader["alias"].ToString());
444        }
445
446        reader.Close();
447        conn.Close();
448
449        return string.Empty;
450    }
451
452    /// <summary>
453    /// get mark up.
454    /// </summary>
455    /// <param name="nodeid">
456    /// The nodeid.
457    /// </param>
458    /// <returns>
459    /// The get mark up.
460    /// </returns>
461    private static string GetMarkUp(string nodeid)
462    {
463        var rtnText = string.Empty;
464        var strSql = "SELECT pk, nodeId, master, alias, design FROM cmsTemplate where nodeid=" + nodeid;
465
466        var conn = new MySqlConnection(ConfigurationManager.AppSettings["ImportDB"]);
467        var cmd = new MySqlCommand(strSql, conn);
468
469        conn.Open();
470
471        var reader = cmd.ExecuteReader();
472
473        while (reader.Read())
474        {
475            rtnText = reader["design"].ToString();
476        }
477
478        reader.Close();
479        conn.Close();
480
481        var startPos = rtnText.IndexOf(">");
482
483        return rtnText.Substring(startPos + 1);
484    }
485
486    /// <summary>
487    /// The get tab.
488    /// </summary>
489    /// <param name="tabid">
490    /// The tabid.
491    /// </param>
492    /// <returns>
493    /// The tab.
494    /// </returns>
495    private static string GetTab(string tabid)
496    {
497        if (tabid != string.Empty)
498        {
499            var strSql = "SELECT id,text,sortorder FROM cmsTab where id=" + tabid;
500
501            var conn = new MySqlConnection(ConfigurationManager.AppSettings["ImportDB"]);
502            var cmd = new MySqlCommand(strSql, conn);
503
504            conn.Open();
505
506            var tab = string.Empty;
507            var reader = cmd.ExecuteReader();
508
509            while (reader.Read())
510            {
511                tab = reader["text"].ToString();
512            }
513
514            reader.Close();
515            conn.Close();
516
517            if (tab != string.Empty)
518            {
519                return ", Tab=\"" + tab + "\"";
520            }
521
522            return string.Empty;
523        }
524
525        return string.Empty;
526    }
527
528    /// <summary>
529    /// The get validation.
530    /// </summary>
531    /// <param name="isMandatory">
532    /// The is mandatory.
533    /// </param>
534    /// <param name="rgx">
535    /// The rgx.
536    /// </param>
537    /// <returns>
538    /// The  validation.
539    /// </returns>
540    private static string GetValidation(string isMandatory, string rgx)
541    {
542        var sb = new StringBuilder();
543
544        sb.Append(isMandatory == "True" ? ",Mandatory=true" : ",Mandatory=false");
545
546        if (rgx != string.Empty)
547        {
548            sb.Append(",ValidationRegExp=\"" + rgx.Replace("\\", "\\\\") + "\"");
549        }
550
551        return sb.ToString();
552    }
553
554    /// <summary>
555    /// The create doc types.
556    /// </summary>
557    private void CreateDocTypes()
558    {
559        var path = this.Server.MapPath("DocumentTypes");
560
561        path = path + "\\";
562
563        const string StrSql =
564            "SELECT     cmsContentType.pk, cmsContentType.nodeId, cmsContentType.alias, cmsContentType.icon, cmsContentType.thumbnail, cmsContentType.description, "
565            + "cmsContentType.masterContentType, umbracoNode.text FROM cmsContentType INNER JOIN "
566            + "umbracoNode ON cmsContentType.nodeId = umbracoNode.id "
567            + "WHERE     (cmsContentType.masterContentType = 0) or (cmsContentType.masterContentType is null) " + "ORDER BY cmsContentType.alias";
568
569        var conn = new MySqlConnection(ConfigurationManager.AppSettings["ImportDB"]);
570        var cmd = new MySqlCommand(StrSql, conn);
571
572        conn.Open();
573
574        var reader = cmd.ExecuteReader();
575
576        while (reader.Read())
577        {
578            var sb = new StringBuilder();
579            sb.AppendLine(GetAllowedContentType(reader["nodeid"].ToString()));
580            this.Response.Write("Create Doc Type for " + reader["text"] + " (" + reader["nodeid"] + ")<br/>");
581
582            sb.AppendLine("using System;");
583            sb.AppendLine("using System.Collections.Generic;");
584            sb.AppendLine("using System.Linq;");
585            sb.AppendLine("using System.Web;");
586
587            sb.AppendLine("using Vega.USiteBuilder;");
588
589            sb.AppendLine("namespace uSiteBuilderImport.Web.DocumentTypes");
590            sb.AppendLine("{");
591
592            // AllowedTemplates = new string[] { "Property" }
593            sb.AppendLine(
594                "[DocumentType(Name=\"" + reader["text"] + "\",IconUrl=\"" + reader["icon"] + "\""
595                + GetAllowedTemplates(reader["nodeid"].ToString()) + ")]");
596            sb.AppendLine("public class " + reader["alias"] + " : Vega.USiteBuilder.DocumentTypeBase");
597            sb.AppendLine("{");
598
599            sb.AppendLine(CreateProperties(reader["nodeid"].ToString()));
600
601            // Response.Write("Check if any child docs types of " + dr["nodeid"] + "<br/>");
602            this.CreateChildDocType(reader["nodeid"].ToString(), reader["alias"].ToString(), path);
603
604            sb.AppendLine("}");
605            sb.AppendLine("}");
606
607            using (var writer = new StreamWriter(path + reader["alias"] + ".cs"))
608            {
609                writer.Write(sb.ToString());
610            }
611        }
612
613        reader.Close();
614        conn.Close();
615    }
616
617    /// <summary>
618    /// create properties.
619    /// </summary>
620    /// <param name="nodeid">
621    /// The nodeid.
622    /// </param>
623    /// <returns>
624    /// The create properties.
625    /// </returns>
626    private static string CreateProperties(string nodeid)
627    {
628        var strSql =
629            "SELECT id,dataTypeId,contentTypeId,tabId,Alias,Name,helpText,sortOrder,mandatory,validationRegExp,Description FROM cmsPropertyType where contentTypeId="
630            + nodeid + " order by sortOrder";
631
632        var sb = new StringBuilder();
633
634        var conn = new MySqlConnection(ConfigurationManager.AppSettings["ImportDB"]);
635        var cmd = new MySqlCommand(strSql, conn);
636
637        conn.Open();
638
639        var reader = cmd.ExecuteReader();
640
641        while (reader.Read())
642        {
643            sb.AppendLine(
644                "[DocumentTypeProperty(" + GetDataType(Convert.ToInt32(reader["dataTypeId"])) + ",Name=\"" + reader["Name"]
645                + "\",Description=\""
646                + reader["Description"].ToString().Replace(Environment.NewLine, string.Empty).Replace("\"", "\\\"") + "\""
647                + GetTab(reader["tabId"].ToString())
648                + GetValidation(reader["mandatory"].ToString(), reader["validationRegExp"].ToString()) + ")]");
649
650            sb.AppendLine("public string " + reader["alias"] + " { get; set; }");
651        }
652
653        reader.Close();
654        conn.Close();
655
656        return sb.ToString();
657    }
658
659    /// <summary>
660    /// The get allowed templates.
661    /// </summary>
662    /// <param name="nodeid">
663    /// The nodeid.
664    /// </param>
665    /// <returns>
666    /// The allowed templates.
667    /// </returns>
668    private static string GetAllowedTemplates(string nodeid)
669    {
670        string strSql =
671            "SELECT     cmsDocumentType.contentTypeNodeId, cmsDocumentType.templateNodeId, cmsDocumentType.IsDefault, cmsTemplate.alias "
672            + "FROM         cmsDocumentType INNER JOIN "
673            + "cmsTemplate ON cmsDocumentType.templateNodeId = cmsTemplate.nodeId "
674            + "WHERE  cmsDocumentType.contentTypeNodeId =" + nodeid + " order by isDefault desc";
675
676        var conn = new MySqlConnection(ConfigurationManager.AppSettings["ImportDB"]);
677        var cmd = new MySqlCommand(strSql, conn);
678
679        conn.Open();
680
681        var sb = new StringBuilder();
682        var reader = cmd.ExecuteReader();
683
684        while (reader.Read())
685        {
686            sb.Append("\"" + reader["alias"] + "\",");
687        }
688
689        reader.Close();
690        conn.Close();
691
692        if (sb.ToString() != string.Empty)
693        {
694            // If there are more than one templates we have to specify default template
695            return ", AllowedTemplates = new string[] {" + sb.ToString().Remove(sb.Length - 1, 1) + "}"
696                   + GetDefaultTemplateDocType(nodeid);
697        }
698
699        return string.Empty;
700    }
701
702    #endregion
703}