Import Microsoft XML 2.0

To register Microsoft XML, version 2.0 with Delphi, I choose Project | Import Type Library, find Microsoft XML version 2.0 (version 2.0), and click Install

I got many errors, like Undeclared identifier 'root', which points the root is not identified in the function below

function TXMLDocument.Get_root(out p: IXMLElement2): HResult;
begin
    Result := DefaultInterface.root[p];
end;

How to solve the problem?


Peter
petershaw9Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Imthiyaz_phCommented:
I tried importing XML 2.0 and its working for me. I m getting the ouput like this:

function TXMLDocument.Get_root(out p: IXMLElement2): HResult;
begin
    Result := DefaultInterface.Get_root(p);
end;
Eddie ShipmanAll-around developerCommented:
petershaw9,
   What version of Delphi are you using?
petershaw9Author Commented:
Delphi 6.
Acturally yesterday I changed the code to Result := DefaultInterface.Get_root(p); But the compiler said the parameter is not enough.

I installed the ms visual studio on my computer.

I have the following msxml files under \sindows\system32
msxml.dll     495K  4/8/2004 (d/m/yyyy)
mxxml2.dll   685K  4/8/2004
and some msxml3, 4, 6 etc.

Peter
Eddie ShipmanAll-around developerCommented:
Delphi 6 includes the file msxml.pas that is the wrapper for MS XML. just put msxml in your uses.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.