Solved

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

Posted on 2008-06-17
1
576 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Get month and date in a format 4 45
Visual Studio hangs on running project 6 60
VB.net -  GroupBox / Panel DataBinding and behavior 3 23
Wordpress Hacked 1 71
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
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.
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…

756 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