Click here to Skip to main content
15,895,859 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Progress of Linq.Table loading Pin
Eddy Vluggen30-Dec-11 9:17
professionalEddy Vluggen30-Dec-11 9:17 
GeneralRe: Progress of Linq.Table loading Pin
Luc Pattyn30-Dec-11 10:53
sitebuilderLuc Pattyn30-Dec-11 10:53 
GeneralRe: Progress of Linq.Table loading Pin
Eddy Vluggen30-Dec-11 11:00
professionalEddy Vluggen30-Dec-11 11:00 
GeneralRe: Progress of Linq.Table loading Pin
Sonhospa31-Dec-11 10:54
Sonhospa31-Dec-11 10:54 
AnswerRe: Progress of Linq.Table loading Pin
Eddy Vluggen31-Dec-11 11:28
professionalEddy Vluggen31-Dec-11 11:28 
Questionhow to find a winform by name in VS project? Pin
sanyexian26-Dec-11 14:25
sanyexian26-Dec-11 14:25 
AnswerRe: how to find a winform by name in VS project? Pin
Luc Pattyn26-Dec-11 14:37
sitebuilderLuc Pattyn26-Dec-11 14:37 
QuestionUpdate Child Nodes in Vb.net Pin
εїзεїзεїз25-Dec-11 19:28
εїзεїзεїз25-Dec-11 19:28 
Thanks in advance,

I want to Update child nodes of a node, like in my XML document i have a node "Name", i want that it will search for its child Node "First_Name" having inner text "FN2" and then will update its Parents other child nodes like "Middle_Name" and "Last_Name".

I had asked this Question Here
www.codeproject.com/Questions/305565/how-to-Update-more-then-one-child-nodes-in-vb-net[^]


and got answer to obtain this Using LINQ , is there any other way to do this

Xml File

XML
<?xml version="1.0"?>
<Names>
  <Name>
    <First_Name>FN 1</First_Name>
    <Middle_Name>MN 1</Middle_Name>
    <Last_Name>LN 1</Last_Name>
    <Country_Code>001</Country_Code>
    <Area_Code>
    </Area_Code>
    <Phone_No>
    </Phone_No>
    <Email_Address>mail@email.com</Email_Address>
    <Address>Address 1</Address>
  </Name>
  <Name ID="2">
    <First_Name>FN2</First_Name>
    <Middle_Name>Mn2</Middle_Name>
    <Last_Name>Ln2</Last_Name>
    <Country_Code>02</Country_Code>
    <Area_Code>002</Area_Code>
    <Phone_No>0002</Phone_No>
    <Email_Address>email@mail2.com</Email_Address>
    <Address>
    </Address>
  </Name>
  </Names>




Code:


Function Edit() As Boolean
        Try
            'Dim xd As New XmlDocument()
            'xd.Load(App_Path)
            'Dim nod As XmlNodeList = xd.SelectNodes("//First_Name[. = '" & txtFName.Text & "']" & "/parent::node()/First_Name")

            'If nod IsNot Nothing Then
            '    For Each node In nod
            '        'nod.Item(0).ChildNodes(0).InnerText = txtMName.Text.Trim
            '        'nod.Item(0).ChildNodes(1).InnerText = txtLName.Text.Trim
            '    Next

            'End If

            Dim xd As New XmlDocument()
            xd.Load(App_Path)
            Dim nod As XmlNode = xd.SelectSingleNode("//First_Name[. = '" & txtFName.Text & "']" & "/parent::node()/First_Name")
            If nod IsNot Nothing Then
                nod.ChildNodes(0).InnerText = "33"
                nod.ChildNodes(1).InnerText = "333"
            End If
 
            Edit = True
        Catch ex As Exception
 
            MessageBox.Show(ex.Message)
            ctlStatus.Text = "Current State : " & ex.Message.ToString
            Return False
        End Try
        Return Edit
    End Function

SOFTDEV

Luck in life always exists in the form of an abstract class that cannot be instantiated directly and needs to be inherited by hard work and dedication.

AnswerRe: Update Child Nodes in Vb.net Pin
RobCroll27-Dec-11 15:44
RobCroll27-Dec-11 15:44 
QuestionError while convert C# to VB Pin
Member 829391525-Dec-11 5:30
Member 829391525-Dec-11 5:30 
AnswerRe: Error while convert C# to VB Pin
Luc Pattyn25-Dec-11 12:24
sitebuilderLuc Pattyn25-Dec-11 12:24 
QuestionExample Api hook for ExitWindowsEx Pin
Edbanger196124-Dec-11 6:29
Edbanger196124-Dec-11 6:29 
AnswerRe: Example Api hook for ExitWindowsEx Pin
Luc Pattyn25-Dec-11 12:27
sitebuilderLuc Pattyn25-Dec-11 12:27 
GeneralRe: Example Api hook for ExitWindowsEx Pin
Edbanger196125-Dec-11 19:52
Edbanger196125-Dec-11 19:52 
QuestionLooking for developers to help in free and opensource project Pin
Constantinos Coudounaris23-Dec-11 8:39
Constantinos Coudounaris23-Dec-11 8:39 
AnswerRe: Looking for developers to help in free and opensource project Pin
Dalek Dave23-Dec-11 9:52
professionalDalek Dave23-Dec-11 9:52 
Answer[resolved] Update form from other thread Pin
Sonhospa22-Dec-11 22:34
Sonhospa22-Dec-11 22:34 
QuestionRe: Update form from other thread Pin
Richard MacCutchan22-Dec-11 22:50
mveRichard MacCutchan22-Dec-11 22:50 
AnswerRe: Update form from other thread Pin
Sonhospa23-Dec-11 0:16
Sonhospa23-Dec-11 0:16 
GeneralRe: Update form from other thread Pin
Richard MacCutchan23-Dec-11 0:42
mveRichard MacCutchan23-Dec-11 0:42 
GeneralRe: Update form from other thread Pin
Sonhospa23-Dec-11 1:02
Sonhospa23-Dec-11 1:02 
AnswerRe: Update form from other thread Pin
Shameel22-Dec-11 23:18
professionalShameel22-Dec-11 23:18 
GeneralRe: Update form from other thread Pin
Sonhospa23-Dec-11 0:05
Sonhospa23-Dec-11 0:05 
GeneralRe: Update form from other thread Pin
Shameel23-Dec-11 0:31
professionalShameel23-Dec-11 0:31 
GeneralRe: Update form from other thread Pin
Sonhospa23-Dec-11 0:36
Sonhospa23-Dec-11 0:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.