Add Tab tag
This commit is contained in:
@@ -25,20 +25,20 @@ namespace BoerseDataConvert
|
|||||||
public string ConvertToXml(Record record)
|
public string ConvertToXml(Record record)
|
||||||
{
|
{
|
||||||
StringBuilder xmlRecord = new StringBuilder();
|
StringBuilder xmlRecord = new StringBuilder();
|
||||||
xmlRecord.Append($"<record id=”{count}”>\n");
|
xmlRecord.Append($" <record id=”{count}”>\n");
|
||||||
foreach (var tagValue in record.TagsValues)
|
foreach (var tagValue in record.TagsValues)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string tag =CheckTagValue(tagValue.Key, tagValue.Value);
|
string tag =CheckTagValue(tagValue.Key, tagValue.Value);
|
||||||
xmlRecord.Append($"<{tag}>{tagValue.Value}</{tag}>\n");
|
xmlRecord.Append($" <{tag}>{tagValue.Value}</{tag}>\n");
|
||||||
}
|
}
|
||||||
catch (ArgumentException e)
|
catch (ArgumentException e)
|
||||||
{
|
{
|
||||||
Console.WriteLine(e.Message);
|
Console.WriteLine(e.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xmlRecord.Append($"</record>");
|
xmlRecord.Append($" </record>");
|
||||||
count++;
|
count++;
|
||||||
return xmlRecord.ToString();
|
return xmlRecord.ToString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace BoerseDataConvert
|
|||||||
// -o directory or --output direcory
|
// -o directory or --output direcory
|
||||||
// -h - help
|
// -h - help
|
||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
Reader reader = new Reader(@"E:\Downloads\TestData-2021_07_02", new string[2] { "subtype910.txt","subtype916.txt" });
|
Reader reader = new Reader(@"E:\Downloads\TestData-2021_07_02", new string[1] { "subtype910.txt" });
|
||||||
RecordController a = new RecordController("");
|
RecordController a = new RecordController("");
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user