Click here to Skip to main content
15,895,142 members
Home / Discussions / C#
   

C#

 
Questionbool[] from value Pin
DaveyM6924-Apr-09 0:51
professionalDaveyM6924-Apr-09 0:51 
AnswerRe: bool[] from value Pin
musefan24-Apr-09 1:01
musefan24-Apr-09 1:01 
GeneralRe: bool[] from value Pin
DaveyM6924-Apr-09 1:18
professionalDaveyM6924-Apr-09 1:18 
AnswerRe: bool[] from value Pin
JoeSharp24-Apr-09 1:07
JoeSharp24-Apr-09 1:07 
GeneralRe: bool[] from value Pin
DaveyM6924-Apr-09 1:20
professionalDaveyM6924-Apr-09 1:20 
Questionhow to repeat the files stored in d playlist Pin
mist_psycho24-Apr-09 0:41
mist_psycho24-Apr-09 0:41 
AnswerRe: how to repeat the files stored in d playlist Pin
Henry Minute24-Apr-09 1:18
Henry Minute24-Apr-09 1:18 
QuestionValidate xml against DTD Pin
Rohit16db24-Apr-09 0:25
Rohit16db24-Apr-09 0:25 
Hi guys,

Hope you are doing well.

I have a Onix complaint XML document that I want to validate it with some Onix complaint DTD. I did coding for same in C#

XmlReaderSettings settings = null;
try
{

string xmlPath = Server.MapPath("XML/nielsen_onix.XML");


//Load XML into XmlTextReader
// reader = new XmlTextReader(xmlPath);
//Load XmlTextReader into XmlValidatingReader
settings = new XmlReaderSettings();

//Set the validation type
settings.ValidationType = ValidationType.DTD;
settings.ProhibitDtd = false;
settings.CheckCharacters = false;
//Hook up the XmlValidatingReader’s
//ValidationEventHandler to a call
//back method named ValidationCallBack
settings.ValidationEventHandler += new ValidationEventHandler(
this.ValidationCallBack);
XmlReader reader = XmlReader.Create(xmlPath, settings);
//Read through the XML document by calling
//the Read() method
while (reader.Read()) { }

//Check boolean field named valid (located at top of code)
if (valid)
Response.Write("Validation is Successful!");
reader.Close();
}
catch(Exception ex) {
Response.Write(ex.Message);
}

This code runs good and show the xml file invaid while my xml file is valid when I validated it on
http://www.w3schools.com/XML/xml_validator.asp[^]

Could you please check what's wrong going with me?

Any help would be highly appreciable.

Thanks
Rohit
Questionswap printer ports Pin
nijix123-Apr-09 23:32
nijix123-Apr-09 23:32 
QuestionDataRow.GetChildRows do not return any rows Pin
Member 411807123-Apr-09 23:28
Member 411807123-Apr-09 23:28 
QuestionWhat is the funda behind the comm component.. ? Pin
ddravin200023-Apr-09 23:15
ddravin200023-Apr-09 23:15 
AnswerRe: What is the funda behind the comm component.. ? Pin
DoctorMick24-Apr-09 0:46
DoctorMick24-Apr-09 0:46 
AnswerRe: What is the funda behind the comm component.. ? Pin
PIEBALDconsult24-Apr-09 3:52
mvePIEBALDconsult24-Apr-09 3:52 
Questionmonitoring whole registry Pin
Gergely Revay23-Apr-09 23:14
Gergely Revay23-Apr-09 23:14 
AnswerRe: monitoring whole registry Pin
Bharat Jain24-Apr-09 2:39
Bharat Jain24-Apr-09 2:39 
GeneralRe: monitoring whole registry Pin
Gergely Revay25-Apr-09 10:14
Gergely Revay25-Apr-09 10:14 
QuestionAbout Water Mark over Existing Video Pin
Abhishek Rana23-Apr-09 21:40
Abhishek Rana23-Apr-09 21:40 
QuestionDiffernce between private readonly fields and non private readonly fields Pin
DJ24523-Apr-09 20:44
DJ24523-Apr-09 20:44 
AnswerRe: Differnce between private readonly fields and non private readonly fields Pin
Ashfield23-Apr-09 20:51
Ashfield23-Apr-09 20:51 
AnswerRe: Differnce between private readonly fields and non private readonly fields Pin
CPallini23-Apr-09 21:41
mveCPallini23-Apr-09 21:41 
AnswerRe: Differnce between private readonly fields and non private readonly fields Pin
PIEBALDconsult24-Apr-09 3:53
mvePIEBALDconsult24-Apr-09 3:53 
Questionhow to read pdf file.... Pin
raj23136223-Apr-09 20:16
raj23136223-Apr-09 20:16 
AnswerRe: how to read pdf file.... Pin
Christian Graus23-Apr-09 20:26
protectorChristian Graus23-Apr-09 20:26 
GeneralRe: how to read pdf file.... Pin
raj23136223-Apr-09 20:39
raj23136223-Apr-09 20:39 
AnswerRe: how to read pdf file.... [modified] Pin
tom57200723-Apr-09 22:09
tom57200723-Apr-09 22:09 

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.