I want to create a dll in VB.NET. The functionality of the dll is that it should include all the xml operations. Any application that uses this dll will just pass the node that has to be selected. The dll will accept the node name and search for the node in the xml file and return the details of the node. For example:
if the xml file is like
If the application which uses the dll calls a function named readNode(Node3) which is defined in the dll, then the dll should be able to retrieve all the details of Node3 including subnodes and theire attribute values and return it to the calling application. All the XML operations are to be done in the dll. The calling application will just call the method in the dll by passing the node name and it should be able to get all the node or attribute values.
Can anybody please advice me the best way of doing this both memory wise and performance wise.
Any help will be highly appreciated.
Thanks in advance
:)
Andrew FensterPosted Aug 19, 2010, 1:46 PM
My suggestion is that you make a class with a name like XmlUtilities. This class should have a series of public static methods to parse XML.
In your other projects / web applications / batch jobs that need to call your XmlUtilties, you right click on the project name in the solution explorer and add a reference to your new class library.
Your class library will compile into a .dll. Your other projects, once you add a reference, will make a copy of the .dll and put it in their bin folder. So each project / website / etc. will have a copy of the .dll. Normally that would be fine. If you are really worried about having multiple copies of the .dll, you can copy the .dll into the GAC (Global Access Cache) and then have all your other projects add a reference to that copy. That's a much more involved effort, and it sounds like overkill for your project.
Good luck.