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

  • Home
  • SEARCH
  • 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 7903213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:41:33+00:00 2026-06-03T09:41:33+00:00

I just want to catch evry node in the xml post from the iphone,

  • 0

I just want to catch evry node in the xml post from the iphone, for example this is the xml file that i need to “get”

<Matchs>
   <owner>Me</owner>
   <typeAction>Me</typeAction>
   <match id=21>sept  3 2011 </match>
   <match id=22>sept  4 2011 </match>
   <match id=23>sept  5 2011 </match>

</Matchs>

I’m able to get every node but when there is more than one node with the same name I dont know how to do it…

this is my code to get the values:

Public Shared Function TryParse(ByVal value As String, ByRef notification As MatchModel) As Boolean
    Dim success As Boolean = False
    notification = Nothing
    Try
        Dim xReader As System.Xml.XmlReader = System.Xml.XmlReader.Create(New System.IO.StringReader(value))
        Dim element As System.Xml.Linq.XElement = System.Xml.Linq.XElement.Load(xReader)
        notification = New MatchModel()
        ' Populate the top XML elements values
        Dim wItem As System.Xml.Linq.XElement = Nothing
        Dim actual As matchAlone = Nothing

        While xReader.MoveToElement()
            If element IsNot Nothing Then
                wItem = element.Element("match")
                actual.Description = GetXElementValue(element, "match")
                actual.Id = GetWorkItemAttributeValue(wItem, "id")
            End If
        End While
        notification.Owner = GetXElementValue(element, "owner")
        notification.TypeAction = GetXElementValue(element, "typeAction")
        success = True
    Catch e As Exception
        Console.WriteLine(e.Message)
    End Try
    Return success
End Function


Public Shared Function GetXElementValue(ByVal element As System.Xml.Linq.XElement, ByVal name As System.Xml.Linq.XName) As String
    Dim value As String = Nothing
    If element IsNot Nothing Then
        value = element.Element(name).Value
    End If
    Return value
End Function


Public Shared Function GetWorkItemAttributeValue(ByVal element As System.Xml.Linq.XElement, ByVal name As System.Xml.Linq.XName) As String
    Dim value As String = Nothing
    If element IsNot Nothing Then
        value = element.Attribute(name).Value
    End If
    Return value
End Function

Please heeeeeelp 🙂

  • 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-06-03T09:41:35+00:00Added an answer on June 3, 2026 at 9:41 am
    Dim doc as XmlDocument = New XmlDocument()
    doc.LoadXml(value)
    For Each node as XmlNode in doc.SelectNodes("/Matches/Match")
        'Do work
    Next
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just want to know how to read an attribute of a parent node from
I think that I fully understand this, but I just want to make sure
Just want to ask can netbean IDE get connected to clearcase remote client server
I just want to get a quick htaccess redirection. ie: domain.com/subfolderGreen --> domain.com/index.php?folder=subfolderGreen (note
I just want to know how does the table resulting from readXML look like,
I just want to know if there is a program that can convert an
I just want get my video playUrl in android.... I have checked the relevant
I just want to get the pressed char in WPF RichtTextbox. Private Sub rtb_KeyDown(sender
I just want to catch Open and Save Events in the all workbooks (with
I just want to ask if anybody else is also having problems with this;

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.