public string FormatSQLTree(Node sqlTreeDoc) { BaseFormatterState state = new BaseFormatterState(HTMLColoring); if (sqlTreeDoc.Name == SqlStructureConstants.ENAME_SQL_ROOT && sqlTreeDoc.GetAttributeValue(SqlStructureConstants.ANAME_ERRORFOUND) == "1") { state.AddOutputContent(ErrorOutputPrefix); } //pass "doc" itself into process: useful/necessary when formatting NOFORMAT sub-regions from standard formatter ProcessSqlNodeList(new[] { sqlTreeDoc }, state); return(state.DumpOutput()); }
public string FormatSQLTree(XmlDocument sqlTreeDoc) { string rootElement = SqlXmlConstants.ENAME_SQL_ROOT; BaseFormatterState state = new BaseFormatterState(HTMLColoring); if (sqlTreeDoc.SelectSingleNode(string.Format("/{0}/@{1}[.=1]", rootElement, SqlXmlConstants.ANAME_ERRORFOUND)) != null) state.AddOutputContent(ErrorOutputPrefix); XmlNodeList rootList = sqlTreeDoc.SelectNodes(string.Format("/{0}/*", rootElement)); ProcessSqlNodeList(state, rootList); return state.DumpOutput(); }
private static string FormatSQLNodes(XmlNodeList nodes, BaseFormatterState state) { ProcessSqlNodeList(state, nodes); return(state.DumpOutput()); }
private static string FormatSQLNodes(XmlNodeList nodes, BaseFormatterState state) { ProcessSqlNodeList(state, nodes); return state.DumpOutput(); }