0
votes

Im in the making of a little project at school:

A client where you enter calendar events A webpage that presents those events in some nice way.

The thing is that we MUST use some database that handles xml-files (free project of choice, mine doesnt really need a database). I googled and found out about eXist (not google-friendly name :-( ). I´ve set up a server and uploaded the xml-file.

Questions:

  1. How to connect?

  2. Im trying to figure out how to send/edit the xml-file from C# (I've installed and added Saxon to Visual Studio) to eXist. (if connected)

Im new to the C# language and new to the concept of xml-files.

My program can edit local xml-files and add events, now I need to figure out how to write to the database.

Or is there some other database that handles xml-files and xquerys thats more well documented using C# to connect?

2
A newly asked question. See how xml handling is done. - L.B
Very difficult to answer your question: it's not very specific. If you need an open source XML database then eXist is probably a good choice, but the learning curve for any database product is significant, and open source products are often not especially well documented. - Michael Kay

2 Answers

0
votes

For eXist-db related questions (note that eXist-db is the better term to google), I'd suggest joining the exist-open mailing list, where most users of eXist-db live and breathe. You're likely to get a quick reply there. Subscribe at https://lists.sourceforge.net/lists/listinfo/exist-open. Cheers.

0
votes

Using SOAP:

Create .cs files for SOAP connection:

Using the command promt and wsdl.exe found in "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\"

"wsdl.exe http://localhost:8080/exist/services/Query?wsdl"

"wsdl.exe http://localhost:8080/exist/services/Admin?wsdl"

Gives you the .cs files needed in the project (copy them to project and include).

QueryService qs = new QueryService();

private void dbConnection() 
        {            
            try
            {
                currentSession = qs.connect("user", "password");
            }
            catch (Exception catcherror)
            {
                MessageBox.Show(catcherror.ToString(), "Error connecting to the database");
            }

        }

When this is done you find everything you need here:

http://exist-db.org/exist/api/org/exist/soap/Admin.html

http://exist-db.org/exist/api/org/exist/soap/Query.html