public override string ToXml(string tab) { StringBuilder builder = new StringBuilder(); builder.Append(tab).Append(FormatXmlRecordHeader(RecordName, HexDump.ToHex(RecordId), HexDump.ToHex(Version), HexDump.ToHex(Instance))); for (IEnumerator <EscherRecord> iterator = _childRecords.GetEnumerator(); iterator.MoveNext();) { EscherRecord record = iterator.Current; builder.Append(record.ToXml(tab + "\t")); } builder.Append(tab).Append("</").Append(RecordName).Append(">\n"); return(builder.ToString()); }
public override String ToXml(String tab) { String theDumpHex = HexDump.ToHex(_thedata, 32); StringBuilder builder = new StringBuilder(); builder.Append(tab).Append(FormatXmlRecordHeader(GetType().Name, HexDump.ToHex(RecordId), HexDump.ToHex(Version), HexDump.ToHex(Instance))) .Append(tab).Append("\t").Append("<IsContainer>").Append(IsContainerRecord).Append("</IsContainer>\n") .Append(tab).Append("\t").Append("<Numchildren>").Append(HexDump.ToHex(_childRecords.Count)).Append("</Numchildren>\n"); for (IEnumerator <EscherRecord> iterator = _childRecords.GetEnumerator(); iterator.MoveNext();) { EscherRecord record = iterator.Current; builder.Append(record.ToXml(tab + "\t")); } builder.Append(theDumpHex).Append("\n"); builder.Append(tab).Append("</").Append(GetType().Name).Append(">\n"); return(builder.ToString()); }