public static void ExportToXMLNode(IList<Dictionary<String, Object>> list, TextWriter outp, int indent, bool onlyASCII)
{
String dep = "";
if (indent != -1) {
for (int k = 0; k < indent; ++k)
dep += " ";
}
foreach (Dictionary<String, Object> map in list) {
String title = null;
outp.Write(dep);
outp.Write("<Title ");
IList<Dictionary<String, Object>> kids = null;
foreach (KeyValuePair<string,object> entry in map) {
String key = entry.Key;
if (key.Equals("Title")) {
title = (String)entry.Value;
continue;
}
else if (key.Equals("Kids")) {
kids = (IList<Dictionary<String, Object>>)entry.Value;
continue;
}
else {
outp.Write(key);
outp.Write("=\"");
String value = (String)entry.Value;
if (key.Equals("Named") || key.Equals("NamedN"))
value = EscapeBinaryString(value);
outp.Write(XMLUtil.EscapeXML(value, onlyASCII));
outp.Write("\" ");
}
}
outp.Write(">");
if (title == null)
title = "";
outp.Write(XMLUtil.EscapeXML(title, onlyASCII));
if (kids != null) {
outp.Write("\n");
ExportToXMLNode(kids, outp, indent == -1 ? indent : indent + 1, onlyASCII);
outp.Write(dep);
}
outp.Write("</Title>\n");
}
}