I need to validate string
string parameter="<HostName>Arasanalu</HostName><AdminUserName>Administrator</AdminUserName><AdminPassword>A1234</AdminPassword><PlaceNumber>38</PlaceNumber>"
While converting to correct xml I will be adding Root element:
if (string.IsNullOrEmpty(value) == false)
{
// Try to load the value into a document
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml("<root>" + value + "</root>");
return true;
}
I want to Validate my string which will be converted to XML format with XML Schema. please let me know which is the best procedure ?