[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Problems with MSXML 3.0

Subject: Problems with MSXML 3.0
From: "Eder de Oliveira" <eder@xxxxxxxxxxxxx>
Date: Fri, 16 Jan 2004 08:39:34 -0300
msxml3 problems
Hi people,

I do an application in Delphi 6, this application validate a XML document
using a XSL document and parser MSXML3.0.

My code:

procedure TForm1.Button1Click(Sender: TObject);
var
  XMLDocument: TDOMDocument30;
  IXMLDoc : IXMLDomDocument2;
  XMLSchema : TXMLSchemaCache30;
Begin
try
      XMLdocument30 := TDOMDocument30.Create(nil);
      try
        IXMLDoc := XMLDocument30.DefaultInterface;
        IXMLDoc.async := false;
        IXMLDoc.load(OpenDialog.FileName);
        XMLDocument30.ConnectTo(IXMLDoc);

        XMLSchema30 := TXMLSchemaCache30.Create(nil);


XMLSchema30.DefaultInterface.add('http://www.cnpq.br/2002/XSD/lattes','C:\La
ttes\Curriculo\LMPL\XSD\LMPLCurriculo.xsd');
        XMLDocument30.schemas :=
XMLSchema30.DefaultInterface.get('CURRICULO-VITAE');
      except
        raise
EgstXMLException.Create(XMLDocument30.DefaultInterface.parseError.errorCode,
XMLDocument30.DefaultInterface.parseError.reason);
      end;

      if (XMLDocument30.validate.errorCode <> 0) then begin
        if GstMessageDlg(msgXMLMalFormado,mtConfirmation, [mbYes, mbNo],
           0,dtlXMLMalFormado,false) = mrYes then
             result := true
        else
          result := false;
      end
      else
        result := true;
    finally
      IXMLDoc := nil;
      XMLDocument30 := nil;
      XMLDocument30.Free;
      XMLSchema30 := nil;
      XMLSchema30.Free;
    end;
  end;
end;

When execute line "
XMLSchema30.DefaultInterface.add('http://www.cnpq.br/2002/XSD/lattes','C:\La
ttes\Curriculo\LMPL\XSD\LMPLCurriculo.xsd');". Message Error: 'Incorrect
definition for the root element in schema'.

With the Parser MSXML4.0, I don't have problems.

Can anyone help me please?

thanks
Eder



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.