Can we validate an xml file before use the parser

wxdqz

New Member
Hi everyone,

Is there anyway i could validate and welform a xml file before send it to a parser.

I will explain my scenario so u`ll undestand what i want exactly.

Im writting a CMS using XML. I have used FCKeditor so admin can edit the contents using that and save the contents back to the xml file. The main requirement on this process is that all the contents pass from the FCKeditor needs to be validated and welform before it saves to the xml file.

I use SAX parser to write the contents back to the xml file. But if the FCKvalues are not welform or validated then the parser will fail and altimatly the saving process also fail.

So thats why im kind of wondering if there any way i can check the validity of the FCKeditor value before pass it to the PHP SAX parser.

Hope u`ll undestand my problem.

Any comments and suggestion are also really welcome.

Thanx in advance.

Regards,
Niroshan
 
Back
Top