Click here to Skip to main content
16,004,882 members
Home / Discussions / C#
   

C#

 
AnswerRe: Why? Pin
darkelv27-Mar-08 14:08
darkelv27-Mar-08 14:08 
QuestionSubclassing Socket Pin
Echilon27-Mar-08 8:44
Echilon27-Mar-08 8:44 
GeneralCursor dissappears on toggle. Pin
kumar.bs27-Mar-08 7:44
kumar.bs27-Mar-08 7:44 
QuestionHow to validate an XML string with an XSD file Pin
anto200527-Mar-08 7:10
anto200527-Mar-08 7:10 
GeneralRe: How to validate an XML string with an XSD file Pin
Gareth H27-Mar-08 7:44
Gareth H27-Mar-08 7:44 
GeneralRe: How to validate an XML string with an XSD file Pin
anto200527-Mar-08 22:14
anto200527-Mar-08 22:14 
GeneralRe: How to validate an XML string with an XSD file Pin
anto200527-Mar-08 22:23
anto200527-Mar-08 22:23 
GeneralRe: How to validate an XML string with an XSD file Pin
anto200527-Mar-08 22:34
anto200527-Mar-08 22:34 
sorry , this is my code :

public bool ValidateXML(string xml, string xsdPath, ref string desc)
{


XmlReaderSettings settings = new XmlReaderSettings();
settings.Schemas.Add(XmlSchema.Read(XmlReader.Create(xsdPath), Schema_ValidationEventHandler));
settings.ValidationType = ValidationType.Schema;
settings.ValidationEventHandler += new ValidationEventHandler(settings_ValidationEventHandler);

byte[] data = Encoding.ASCII.GetBytes(xml_string);
MemoryStream memStream = new MemoryStream(data);
XmlTextReader textReader = new XmlTextReader(memStream);

XmlReader rdr = XmlReader.Create(textReader, settings);
try
{
while (rdr.Read()) ;
}
catch (Exception e)
{
desc = e.Message;
rdr.Close();
return false ;
}

return true;

}
Generalrunning a batch file from a command window launched from a c sharp program Pin
Xarzu27-Mar-08 6:04
Xarzu27-Mar-08 6:04 
GeneralRe: running a batch file from a command window launched from a c sharp program Pin
Giorgi Dalakishvili27-Mar-08 6:46
mentorGiorgi Dalakishvili27-Mar-08 6:46 
QuestionUnreachable code detected? Pin
Jasmine250127-Mar-08 5:21
Jasmine250127-Mar-08 5:21 
AnswerRe: Unreachable code detected? Pin
carbon_golem27-Mar-08 5:23
carbon_golem27-Mar-08 5:23 
GeneralRe: Unreachable code detected? Pin
Paul Conrad27-Mar-08 12:26
professionalPaul Conrad27-Mar-08 12:26 
AnswerRe: Unreachable code detected? Pin
Gareth H27-Mar-08 5:33
Gareth H27-Mar-08 5:33 
GeneralRe: Unreachable code detected? Pin
Jasmine250127-Mar-08 5:43
Jasmine250127-Mar-08 5:43 
GeneralRe: Unreachable code detected? Pin
phannon8627-Mar-08 5:48
professionalphannon8627-Mar-08 5:48 
GeneralRe: Unreachable code detected? Pin
Jasmine250127-Mar-08 5:54
Jasmine250127-Mar-08 5:54 
GeneralRe: Unreachable code detected? Pin
Luc Pattyn27-Mar-08 5:53
sitebuilderLuc Pattyn27-Mar-08 5:53 
AnswerRe: Unreachable code detected? Pin
Pete O'Hanlon27-Mar-08 5:51
mvePete O'Hanlon27-Mar-08 5:51 
GeneralRe: Unreachable code detected? Pin
Luc Pattyn27-Mar-08 7:16
sitebuilderLuc Pattyn27-Mar-08 7:16 
AnswerRe: Unreachable code detected? Pin
Rob Philpott27-Mar-08 5:53
Rob Philpott27-Mar-08 5:53 
AnswerRe: Unreachable code detected? Pin
PIEBALDconsult27-Mar-08 6:00
mvePIEBALDconsult27-Mar-08 6:00 
GeneralRe: Unreachable code detected? Pin
Jasmine250127-Mar-08 7:43
Jasmine250127-Mar-08 7:43 
GeneralEvents in C# Pin
Vimalsoft(Pty) Ltd27-Mar-08 3:29
professionalVimalsoft(Pty) Ltd27-Mar-08 3:29 
GeneralRe: Events in C# Pin
Rob Philpott27-Mar-08 3:34
Rob Philpott27-Mar-08 3:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.