public virtual string GetXml() { StringBuilder xmlOut = new StringBuilder(); if (lexRecordObjs_ != null) { xmlOut.Append(LexRecord.GetXmlHeader()); xmlOut.Append(GlobalVars.LS_STR); xmlOut.Append(LexRecord.GetXmlRootBeginTag()); xmlOut.Append(GlobalVars.LS_STR); for (int i = 0; i < lexRecordObjs_.Count; i++) { LexRecord temp = (LexRecord)lexRecordObjs_[i]; xmlOut.Append(temp.GetXml(1)); } xmlOut.Append(LexRecord.GetXmlRootEndTag()); xmlOut.Append(GlobalVars.LS_STR); } return(xmlOut.ToString()); }
private static void CheckRecord(Out @out) { try { if (format_ == 1) { if (printXmlHeader_ == true) { @out.Println(outWriter_, LexRecord.GetXmlHeader(), fileOutput_, false); } @out.Println(outWriter_, LexRecord.GetXmlRootBeginTag(), fileOutput_, false); } for (;;) { if (lineObject_.IsGoToNext() == true) { lineObject_.SetLine(inReader_.ReadLine()); lineObject_.IncreaseLineNum(); } if (!CheckLine(@out)) { break; } } if (format_ == 1) { @out.Println(outWriter_, LexRecord.GetXmlRootEndTag(), fileOutput_, false); } inReader_.Close(); } catch (Exception e) { Console.WriteLine(e.ToString()); Console.Write(e.StackTrace); } }