Solved

Cannot Read an XML file into our Database via VB.NET 2005

Posted on 2008-06-17
1
574 Views
Last Modified: 2013-12-06
I am trying to read an XML file into our database via VB.NET 2005.

I retrieve the file via a WebDAV query to exchange 2003. My XML knowledge is not the strongest and I am really struggling.

The XML is already loaded in a XmlDataDocument object and I need to read all the data from the XML file and read them into the database.

The XML file is below: -

<?xml version="1.0"?>
<a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" xmlns:d="urn:schemas:httpmail:" xmlns:c="xml:" xmlns:e="http://schemas.microsoft.com/mapi/proptag/" xmlns:a="DAV:">
<a:response>
<a:href>http://0.0.0.0/exchange/blair/Inbox/RE:%20Developers%20Conference.EML</a:href>
<a:propstat>
<a:status>HTTP/1.1 200 OK</a:status>
<a:prop>
<d:from>mailfrom</d:from>
<d:to>mailto</d:to>
<d:datereceived b:dt="dateTime.tz">2008-06-17T13:57:21.192Z</d:datereceived>
<d:subject>RE: Developers Conference</d:subject>
<a:uid>AQEAAAAICkcJAAAAAAAAAAAAAAAA</a:uid>
<e:x10800003 b:dt="int">-1</e:x10800003>
</a:prop>
</a:propstat>
<a:propstat>
<a:status>HTTP/1.1 404 Resource Not Found</a:status>
<a:prop>
<e:x10810003 />
</a:prop>
</a:propstat>
</a:response>
<a:response>
<a:href>http://0.0.0.0/exchange/blair/Inbox/RE:-8.EML</a:href><a:propstat>
<a:status>HTTP/1.1 200 OK</a:status>
<a:prop>
<d:from>mailfrom</d:from>
<d:to>mailto</d:to>
<d:datereceived b:dt="dateTime.tz">2008-06-17T13:36:47.000Z</d:datereceived>
<d:subject>RE: </d:subject>
<a:uid>AQEAAAAICkcHAAAAAAAAAAAAAAAA</a:uid>
</a:prop>
</a:propstat>
<a:propstat>
<a:status>HTTP/1.1 404 Resource Not Found</a:status>
<a:prop>
<e:x10800003 />
<e:x10810003 />
</a:prop>
</a:propstat>
</a:response>
</a:multistatus>


0
Comment
Question by:kennethscff
1 Comment
 

Accepted Solution

by:
kennethscff earned 0 total points
ID: 21811565
Here is how it is done!          

 Dim ns As New XmlNamespaceManager(xmlDOMParams.NameTable)
            ns.AddNamespace("b", "urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/")
            ns.AddNamespace("d", "urn:schemas:httpmail:")
            ns.AddNamespace("c", "xml:")
            ns.AddNamespace("e", "http://schemas.microsoft.com/mapi/proptag/")
            ns.AddNamespace("a", "DAV:")


            For Each node As XmlNode In xmlDOMParams.SelectNodes("//a:response", ns)
                MailURLNode = node.SelectSingleNode("a:href", ns)
                MailURL = MailURLNode.InnerText
            Next

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Outsource Your Fax Infrastructure to the Cloud (And come out looking like an IT Hero!) Relative to the many demands on today’s IT teams, spending capital, time and resources to maintain physical fax servers and infrastructure is not a high priority.
As a financial services provider, your business is impacted by two of the strictest federal regulations on record: the Sarbanes-Oxley Act and the Gramm-Leach-Bliley Act. Correctly implementing faxing into your organization to provide secure, real-ti…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question