Click here to Skip to main content
15,905,420 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: XML as data processing Pin
Randy_MJ6-Jul-05 5:16
Randy_MJ6-Jul-05 5:16 
GeneralCreation of XML documents Pin
Member 207049024-Jun-05 0:19
Member 207049024-Jun-05 0:19 
GeneralXSL Quesition Pin
korayyersel23-Jun-05 22:34
korayyersel23-Jun-05 22:34 
GeneralRe: XSL Quesition Pin
toujin4-Jul-05 14:19
toujin4-Jul-05 14:19 
Generalebxml Pin
lhahehal23-Jun-05 20:33
lhahehal23-Jun-05 20:33 
Generalneed some information Pin
23-Jun-05 18:55
suss23-Jun-05 18:55 
GeneralWSDL testing tools Pin
Michael A. Barnhart23-Jun-05 11:44
Michael A. Barnhart23-Jun-05 11:44 
GeneralSchema validation not working Pin
Anonymous23-Jun-05 8:49
Anonymous23-Jun-05 8:49 
I'm attempting to validate some xml and absolutely stumped. However, the code always says it fails.

I'm using the note example from the w3schools.com xml tutorial and using the validator linked
to on their website it says everything is good.

The string coming into the doValidation function is the xml file, as a flat string no linebreaks or carriage returns.

Any thoughts/ideas would be great!

<br />
private bool doValidation( string note )<br />
{<br />
        _isValid=true;<br />
 <br />
        StringReader srXml = new StringReader( note );<br />
<br />
	XmlValidatingReader vr;<br />
	XmlTextReader tr;<br />
	XmlSchemaCollection schemaCol = new XmlSchemaCollection();<br />
	schemaCol.Add( "http://www.w3schools.com", "c:\\note.xsd" );<br />
<br />
	try <br />
	{<br />
		tr = new XmlTextReader( srXml );<br />
		vr = new XmlValidatingReader( tr );<br />
		<br />
                vr.ValidationType = ValidationType.Schema;<br />
		vr.Schemas.Add( schemaCol );<br />
	        vr.ValidationEventHandler += new ValidationEventHandler(validationCallBack);<br />
<br />
		while( vr.Read() )<br />
		{}<br />
	}<br />
	catch( Exception e )<br />
	{<br />
		this._errorMessage = e.Message;<br />
		return false;<br />
	}<br />
<br />
	return _isValid;<br />
}<br />
<br />
private void validationCallBack( object sender, ValidationEventArgs args )<br />
{<br />
	_isValid = false;<br />
	_errorMessage = args.Message;<br />
}<br />

GeneralLearning web services Pin
Goodway22-Jun-05 23:17
Goodway22-Jun-05 23:17 
GeneralRe: Learning web services Pin
Michael A. Barnhart23-Jun-05 11:55
Michael A. Barnhart23-Jun-05 11:55 
Generalroot element is missing Pin
Ahmed Galal21-Jun-05 23:04
Ahmed Galal21-Jun-05 23:04 
GeneralRe: root element is missing Pin
DavidNohejl22-Jun-05 7:33
DavidNohejl22-Jun-05 7:33 
GeneralRe: root element is missing Pin
Ahmed Galal22-Jun-05 12:53
Ahmed Galal22-Jun-05 12:53 
GeneralRe: root element is missing Pin
DavidNohejl22-Jun-05 12:58
DavidNohejl22-Jun-05 12:58 
GeneralRe: root element is missing Pin
Ahmed Galal22-Jun-05 13:04
Ahmed Galal22-Jun-05 13:04 
Generalconfused Pin
Anonymous21-Jun-05 3:41
Anonymous21-Jun-05 3:41 
GeneralRe: confused Pin
Anonymous21-Jun-05 3:47
Anonymous21-Jun-05 3:47 
Questionhow to contract empty tag &lt;col&gt;&lt;/col&gt; to &lt;col/&gt; in XSLT Pin
Lyteck21-Jun-05 1:54
Lyteck21-Jun-05 1:54 
AnswerRe: how to contract empty tag &lt;col&gt;&lt;/col&gt; to &lt;col/&gt; in XSLT Pin
Javier Lozano22-Jun-05 11:48
Javier Lozano22-Jun-05 11:48 
GeneralRe: how to contract empty tag &lt;col&gt;&lt;/col&gt; to &lt;col/&gt; in XSLT Pin
Lyteck27-Jun-05 3:13
Lyteck27-Jun-05 3:13 
GeneralLoading custom control from XSLT Pin
randomnumber21-Jun-05 0:59
randomnumber21-Jun-05 0:59 
GeneralXSD Problem Pin
matt cole20-Jun-05 16:06
matt cole20-Jun-05 16:06 
GeneralXSD Problem Pin
Chetan Ranpariya13-Jul-05 22:29
Chetan Ranpariya13-Jul-05 22:29 
GeneralProblem creating working XSD with restrictions Pin
clatten20-Jun-05 1:42
clatten20-Jun-05 1:42 
GeneralProblem Creating XML [SOLVED] Pin
Paolo Ponzano20-Jun-05 0:16
Paolo Ponzano20-Jun-05 0:16 

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.