By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,214 Members | 2,072 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,214 IT Pros & Developers. It's quick & easy.

Validating Resx files ?

P: n/a
hi all,

I need to validate, via code, some resx files.

I thought I could do something like this:

bool IsValidateResx(string input)
XmlTextReader tr = new XmlTextReader(input);
XmlValidatingReader reader = new XmlValidatingReader(tr);
while (reader.Read()) ;
return true;
catch (XmlSchemaException exception)
SetStatus(string.Format("xml doc invalid : {0}", exception.Message),
return false;

Unfortunatley it fails when validating pefectly good resxs with the
XmlSchemaException exception

"The 'resheader' element is not declared. ....."

What have I missed? is this a namespace issue?



Apr 26 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.