Consuming XmlNode type with classic ASP.

R

rocket504

We wrote a .NET class library that contains a class that produces an
XML document. We traverse that document and set a number of
properties. We wrapped the resulting DLL using COM so that we can
consume it using classic ASP. All of that works just fine. We can
access the XML document and all of the properties. We can load the
XML into a classic ASP variant using the DOM, etc.

We don't need 95 percent of the XML so we are attempting to wring out
some overhead by grabbing an XmlNode from the XML document and setting
it to a property. Since the DLL is returning a complex type, how can
we access the XmlNode property using classic ASP?

Kind of a weird one I know. Need some expert assistance here.
 
O

Old Pedant

We wrote a .NET class library that contains a class that produces an
XML document. We traverse that document and set a number of
properties. We wrapped the resulting DLL using COM so that we can
consume it using classic ASP. All of that works just fine. We can
access the XML document and all of the properties. We can load the
XML into a classic ASP variant using the DOM, etc.

We don't need 95 percent of the XML so we are attempting to wring out
some overhead by grabbing an XmlNode from the XML document and setting
it to a property. Since the DLL is returning a complex type, how can
we access the XmlNode property using classic ASP?

Ummm...add a method to the DLL??

Why do the work in ASP if you can do it in the DLL code? Just add another
method to call that allows the ASP code to select a single XmlNode.

What am I missing?
 
A

Anthony Jones

Old Pedant said:
Ummm...add a method to the DLL??

Why do the work in ASP if you can do it in the DLL code? Just add another
method to call that allows the ASP code to select a single XmlNode.

What am I missing?

The fact that its .NET dll using COM interop which will be using one of the
..NET XML DOM implementation which does not support COM interop. IOW you
can't return System.Xml.XmlNode from a COM component.
 
A

Anthony Jones

We wrote a .NET class library that contains a class that produces an
XML document. We traverse that document and set a number of
properties. We wrapped the resulting DLL using COM so that we can
consume it using classic ASP. All of that works just fine. We can
access the XML document and all of the properties. We can load the
XML into a classic ASP variant using the DOM, etc.

We don't need 95 percent of the XML so we are attempting to wring out
some overhead by grabbing an XmlNode from the XML document and setting
it to a property. Since the DLL is returning a complex type, how can
we access the XmlNode property using classic ASP?

Kind of a weird one I know. Need some expert assistance here.


Consider returning XmlNode.OuterXml as a string instead. Then performing a
LoadXML on an MSXML document.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top