Solved

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

Posted on 2008-06-17
1
577 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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, fr…

710 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