A
ananda vardhana
Guest
This is how I get the string from an ETL file. It appears like XML/JSON but it is neither
<Event MSec= "14710.1843" PID="1820" PName= "" TID="21844" EventName="ErrorEvent" ProviderName="MyProvider" ErrorMsg="XYZ: The memory was not enough to create an object " ErrorID="4,660\"/>
Here I have made it definable in a C# program with "\" to avoid syntax error.
string Event1 = "<Event MSec= \"14710.1843\" PID=\"1820\" PName= \"\" TID=\"21844\" EventName=\"ErrorEvent\" ProviderName=\"MyProvider\" ErrorMsg=\"XYZ: The memory was not enough to create an object \" ErrorID=\"4,660\"/>";
If someone could kindly show me how to parse it or separate it to ID/Value pair as shown below that would be much appreciated. Thanks
MSec= "14710.1843"
PID="1820"
PName= ""
TID="21844"
EventName="ErrorEvent"
ProviderName="MyProvider"
ErrorMsg="XYZ: The memory was not enough to create an object "
ErrorID="4,660"
Any help pointers are welcome. Thanks
regards
ananda
Continue reading...
<Event MSec= "14710.1843" PID="1820" PName= "" TID="21844" EventName="ErrorEvent" ProviderName="MyProvider" ErrorMsg="XYZ: The memory was not enough to create an object " ErrorID="4,660\"/>
Here I have made it definable in a C# program with "\" to avoid syntax error.
string Event1 = "<Event MSec= \"14710.1843\" PID=\"1820\" PName= \"\" TID=\"21844\" EventName=\"ErrorEvent\" ProviderName=\"MyProvider\" ErrorMsg=\"XYZ: The memory was not enough to create an object \" ErrorID=\"4,660\"/>";
If someone could kindly show me how to parse it or separate it to ID/Value pair as shown below that would be much appreciated. Thanks
MSec= "14710.1843"
PID="1820"
PName= ""
TID="21844"
EventName="ErrorEvent"
ProviderName="MyProvider"
ErrorMsg="XYZ: The memory was not enough to create an object "
ErrorID="4,660"
Any help pointers are welcome. Thanks
regards
ananda
Continue reading...