Managed Extensions and XML question

  • Thread starter Thread starter BCC
  • Start date Start date
B

BCC

Hi,

I have a need to read in a very simple xml file and initialized some objects
from the data. I was reading on the ms website that .net contains its own
XML parser, and it sounds pretty good for what I need.

However, to use the code, it looks like I need to compile with managed
extensions. Since my project does not use managed extensions, I am not sure
what the ramifications are of using them in regards to performance.

So two real questions:
1. What is the performance hit or improvement in using managed extensions?
2. If I wish to use code that uses the managed extension syntax, is it
possible to compile this code
without using managed extensions?

Any thoughts or insights are appreciated!

Thanks,
Bryan
 
BCC said:
So two real questions:
1. What is the performance hit or improvement in using managed
extensions?

Usually a huge hit in app startup time, with steady-state performance
comparable (may be worse, may be better, usually within 10-20% or so).
2. If I wish to use code that uses the managed extension syntax, is
it possible to compile this code
without using managed extensions?

No. The mere question is a contradition.
Any thoughts or insights are appreciated!

Use MSXML. It's easy to use from native (unmanaged) C++ and it's faster than
the .NET XML parser.

If you want a lightweight solution that doesn't require installing anything
on the deployment machine (like .NET or MSXML), take a look at libXML
(www.xmlsoft.ort). It's a cross-platform Xml parser that's small, fast and
easy to use.

-cd
 
So two real questions:
Usually a huge hit in app startup time, with steady-state performance
comparable (may be worse, may be better, usually within 10-20% or so).

Okay, seems reasonable.
No. The mere question is a contradition.

Not really. What I meant was that the xml managed code uses a specific
syntax to import namespaces, and requires the mscorlib.dll. I was wondering
if you could access the same functions and namespaces somehow with unmanaged
code.
Use MSXML. It's easy to use from native (unmanaged) C++ and it's faster
than the .NET XML parser.

If you want a lightweight solution that doesn't require installing
anything on the deployment machine (like .NET or MSXML), take a look at
libXML (www.xmlsoft.ort). It's a cross-platform Xml parser that's small,
fast and easy to use.

-cd

Thanks! I will go check this stuff out. Thanks for the suggestions.

B
 
BCC said:
Not really. What I meant was that the xml managed code uses a
specific syntax to import namespaces, and requires the mscorlib.dll. I was
wondering if you could access the same functions and namespaces
somehow with unmanaged code.

No, you can't - you can only access the managed XML classes from managed
code. That said, you can of course mix managed and unmanaged code in a
single application.

-cd
 
Back
Top