Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6972081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:55:20+00:00 2026-05-27T16:55:20+00:00

I’ve been trying to read an XML-file using VB.NET and after some (see 2-3

  • 0

I’ve been trying to read an XML-file using VB.NET and after some (see 2-3 hours) googling and reading I’ve headed in somewhat the right direction, however now I’m at a stop and I can’t find any answers that makes any sense to me.

This is the XML I have:

<?xml version="1.0" encoding="ISO-8859-1"?>
<exportCustomerInformation xmlns="http://www.testdom.se/server/services/exportCustomerInformationNavision" xmlns:met="http://www.testdom.se/server/services/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <data>
        <customers>
            <customerInformation xmlns:nav="http://www.testdom.se/server/services/integration/navision">
                <nav:littera/>
                <nav:parentUuid/>
                <nav:name>TESTBEDRIFTEN AS</nav:name>
                <nav:uuid>77cf992e-766a-4496-9a5a-5105a75214ce</nav:uuid>
                <nav:customerType>1</nav:customerType>
                <nav:emailAddress/>
                <nav:industryBranch/>
                <nav:department>TRONDHEIM</nav:department>
                <nav:invoicingAddress>
                    <nav:streetName>PO BOX 123</nav:streetName>
                    <nav:streetNumber/>
                    <nav:recipient/>
                    <nav:postalCode>7407</nav:postalCode>
                    <nav:city>TRONDHEIM</nav:city>
                    <nav:country>NORWAY</nav:country>
                </nav:invoicingAddress>
                <nav:deliveryAddress>
                    <nav:placeName>TESTBEDRIFTEN AS</nav:placeName>
                <nav:streetName>STORGATEN</nav:streetName>
                    <nav:streetNumber>1</nav:streetNumber>
                    <nav:recipient/>
                    <nav:postalCode>7011</nav:postalCode>
                    <nav:city>TRONDHEIM</nav:city>
                    <nav:country>NORWAY</nav:country>
                </nav:deliveryAddress>
            </customerInformation>
        </customers>
    </data>
</exportCustomerInformation>

In order to read this, I have the following code:

Dim xmlDoc = XDocument.Load(file)
    For Each dataXML As XElement In xmlDoc...<customerInformation>

        oDR = oDT.NewRow
        oDR("parentUuid") = dataXML...<nav:parentUuid>.Value
        oDR("name") = dataXML...<nav:name>.Value
        oDR("uuid") = dataXML...<nav:uuid>.Value
        oDR("customerType") = dataXML...<nav:customerType>.Value
        oDR("emailAddress") = dataXML...<nav:emailAddress>.Value

        'What to here in order to get to these children?
        oDR("invStreetName") = dataXML.<nav:invoicingAddress>.<nav:invStreetName>.Value
        oDR("invStreetNumber") = dataXML.<nav:invoicingAddress>...<nav:invStreetNumber>.Value
        oDR("invName") = dataXML.<nav:invoicingAddress>...<nav:invName>.Value
        oDR("invPostalCode") = dataXML.<nav:invoicingAddress>...<nav:invPostalCode>.Value
        oDR("invCity") = dataXML.<nav:invoicingAddress>...<nav:invCity>.Value
        oDR("invCountry") = dataXML.<nav:invoicingAddress>...<nav:invCountry>.Value

    Next

So, to my question. How can I access the children under the node <invoicingAddress> ??

the code I provided above didn’t do much good. 😛

Any help is dearly appreciated.

//Jaggen

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:55:21+00:00Added an answer on May 27, 2026 at 4:55 pm

    Here is an ugly example of doing it, assuming doc contains the XDocument:

    Dim customerInfo = doc.Root.Elements.First.Elements.First.Elements.First
    
    Dim invoicingAddress = _
    customerInfo.Elements.First(Function(x) x.Name.LocalName = "invoicingAddress")
    
    Dim streetName = _
    invoicingAddress.Elements.First(Function(x) x.Name.LocalName = "streetName").Value
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a jquery bug and I've been looking for hours now, I can't
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an XML file, the creators of it stuck in a bunch social
I am reading a book about Javascript and jQuery and using one of the
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.