Click here to Skip to main content
12,999,833 members (51,588 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

5.9K views
250 downloads
2 bookmarked
Posted 29 Sep 2015

New Method of XML Binding to DataGrid-WPF/VB.NET

, 29 Sep 2015
Rate this:
Please Sign up or sign in to vote.
Normally, XML binding to DataGrid is done through MVVM style. This to me seems a little cumbersome and difficult to understand. Hence I developed a simple method to achieve the same

Introduction

This article actually explains the xml binding on a DataGrid and ListView in WPF-VB.Net. This article uses a new method(propably hither to unknown) developed by me. The method of Building and Debugging this WPF(or any WPF Project) is also developed by me and is unique. It is called the C-Pad style. Cmd notepad style of programming already exists. Even Mark Tabor has a video in Channel C9 about this. But i went ahead and developed the C-Pad style so that it becomes a permanent way(without actually opening the VS IDE). I started this style with windows forms(only windows forms is explained in cmd- notepad programming. No one has dared to venture into WPF. Rather all unanimously declared that WPF is beyond the reach of cmd and notepad. I took it up as a challenge-and after spending a month of my valuable time(I am 68 years old and eah minute is very very valuable to me)-achieved this unique style of C-Pad programming. It is my firm assurance to one and all,if you follow this with interest-you will end up addicted to this and will not open the Visual Studio or its express form againg atleast for WPF.

I am going full blast on this C-Pad and published 20 articles already in DreamInCode(DIC) site. Actually i answered one enquiry in this codeproject on xml Datagrid binding and referred my DIC site for answer. I was rebuked for using third party reference. Hence i took up(again as a challenge!!??!!) to explain in detail of what i was actually referring. I started from February-2015 only doing WPF from scratch. I have started with C-Pad straight-a-way. This style works like a charm in C# also. Only change is .vbproj file becomes .csproj and all other vb files will be cs files. When i download a C# project source code for analysis,i build it C-Pad style only.

Background

This project is about xml binding with DataGrid and ListView in WPF. Usual procedure is to follow MVVM. Plenty of articles available in C#(95%). I felt that MVVM is rather cumbersome and difficult to follow. More so it does not work well with VB.NET. I have tried several MVVM source codes from internet in c# and tried to convert them to VB.Net-only to find that it ends up with errors. Hence i was forced to develope a simple and strightforward method(which will suit any language equally). The result is this project. I have used Indian Hindi veteran actors data to demonstrate my project. My future aim is to use all Hollywood veterans(from Cary Grant to Tom Cruise). This principle will equally suit any commercial project with employee data etc.

A brief description of how to use the article or code:

The C-Pad for WPF basically consists of five files. The names i am giving herewith can be used commonly to all projects.

  1. App1.xaml-The main GUI file with xaml language.
  2. App1.xaml.vb-The code behind file for 1.
  3. Application.xaml-This is the strt up file for Build-Debug. This also helps to hold Resource dicitonaries if any and Project resources if any.
  4. Application.xaml.vb-This is just a two line file- a dummy-this is the same in all my 20 projects. Rarely it changes. I am yet to learn that.
  5. Driver.vbproj-The most important file. As the name denotes,this dirves the Build and Debug process. In the net this carries diffeent names but i just use Driver3.vbproj for all my projects. If you want to know why-write to me. This is xml based file. The present and future of Build-Debug is xml way only. This file can hold all your Imports and you can write all possible Imports in to this. It will not show exemtion for not neede ones.

Apart from thr above there are many auxiliary files that crop up as and when required in a project. I shall explain about them shortly.

How to Build and Debug a WPF project C-Pad style

Rewrite(Copy Paste) all the files provided with the suitable extentions mentioned,in the path mentioned,and put them in a folder XmlBinding,iside a folder WPF-1,in D:drive. The path i am suggesting will be common to all computers,unless you do not have a drive with name D:(which is unusual)

Then you just write a two liner to the cmd window and everything is over.

---------------------------------------------------------------------------------------------->>>Build-Debug
Path of your Driver file:   D:\WPF-1\XmlBinding\Driver3.vbproj

Compiler Calling Path-1:For VisualStudio2015
                            
                            set PATH=%PATH%;C:\Program Files (x86)\MSBuild\14.0\Bin
                            msbuild "D:\WPF-1\XmlBinding\Driver3.vbproj" /t:Build

Compiler Calling Path-2:For VisualStudio2013

                            set PATH=%PATH%;C:\Program Files (x86)\MSBuild\12.0\Bin
                            msbuild "D:\WPF-1\XmlBinding\Driver3.vbproj" /t:Build

If you have older versions,just change the number  MSBuild\?number?\Bin.It will suffice.
---------------------------------------------------------------------------------------------->>>Build-Debug

Now let me explain auiliary files.

  1. MyResurceDictionary.xaml:This is where you store xaml code for change of GUI appearence at runtime when needed. You also store keyed info to recall later. Mention shoul be made that this type of file can be more than and in that case are merged in to <ResourceDictionary.MergedDictionaries> element and placed inside Application.xaml file(One use of this file!).
  2. Xml files:I need not explain this. This project will do the needfull.
  3. Bat file:I need not explain this. This project will do the needfull.
  4. Image files.
  5. Video files.

I can think of only these now. If i come across more i shall come back to you with a suitable project using them.

Actual Project files

1.App1.xaml:Path--D:\WPF-1\XmlBinding\

<Window x:Class="App1"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    Title="KVR-Advanced-Xml-Binding1" Height="1015" Width="1900" Background="Cyan">

    <Window.Resources>   
        <DataTemplate x:Key="actorItemTemplate">
            <Label Content="{Binding XPath=Name}"/>
        </DataTemplate>       
    </Window.Resources>
         
<Grid ShowGridLines="True">       
        <Grid.DataContext>
            <XmlDataProvider x:Name="ActorData" Source="Actors.xml" XPath="Actors/Actor" />
        </Grid.DataContext> 
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="400"/> 
        <ColumnDefinition Width="650"/> 
        <ColumnDefinition Width="850"/>
    </Grid.ColumnDefinitions>

    <Border BorderBrush="Blue" BorderThickness="5" CornerRadius="4" Panel.ZIndex="0" Margin="0,0,0,0" Grid.Column="0"> 
        <StackPanel Orientation="Vertical" Grid.Column="0" Height="950" Width="400">            
            <Label Name="Label1" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="White" Margin="0,0,0,0" 

             Background="Indigo" FontWeight="UltraBold" FontSize="30">Actors</Label>
            <ListBox x:Name="ModelsListBox" DockPanel.Dock="Left" Height="910" Width="380"

                ItemsSource="{Binding}" HorizontalAlignment="Left" FontWeight="UltraBold"

                ItemTemplate="{StaticResource actorItemTemplate}" FontSize="18"

                IsSynchronizedWithCurrentItem="True" Background="Pink"

                Visibility="Visible" SelectionMode="Single">
            </ListBox>
        </StackPanel>  
    </Border>

    <Border BorderBrush="Red" BorderThickness="5" CornerRadius="4" Panel.ZIndex="0" Margin="0,0,0,0" Grid.Column="1"> 
        <StackPanel Margin="0,0,0,0" Orientation="Vertical" Grid.Column="1" Grid.Row="0" Height="1000" Width="650">
         <Grid Margin="0,10,0,0" ShowGridLines="True">           
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>                
                <RowDefinition Height="40"/>
                <RowDefinition Height="600"/>
                <RowDefinition Height="150"/>        
            </Grid.RowDefinitions>                       
               <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="0" Height="40" Width="650">
               <Label x:Name="Label2" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="White" Margin="0,0,0,0" 

                 Background="Indigo" FontWeight="UltraBold" FontSize="18">ID</Label>
               <TextBox x:Name="idbox" Height="40" Width="650" Text="{Binding XPath=Id}" FontWeight="UltraBold" FontSize="18"/>
               </StackPanel>
               <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="1" Height="40" Width="650">
               <Label x:Name="Label3" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="White" Margin="0,0,0,0" 

                 Background="Indigo" FontWeight="UltraBold" FontSize="18">Name</Label>
               <TextBox x:Name="namebox" Height="40" Width="650" Text="{Binding XPath=Name}" FontWeight="UltraBold" FontSize="18"/>
               </StackPanel>
               <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="2" Height="40" Width="650">
               <Label x:Name="Label4" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="White" Margin="0,0,0,0" 

                 Background="Indigo" FontWeight="UltraBold" FontSize="18">BestFilm</Label>
               <TextBox x:Name="bestfilmbox" Height="40" Width="650" Text="{Binding XPath=BestFilm}" FontWeight="UltraBold" FontSize="18"/>               
               </StackPanel>
               <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="3" Height="40" Width="650">
               <Label x:Name="Label5" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="White" Margin="0,0,0,0" 

                 Background="Indigo" FontWeight="UltraBold" FontSize="18">LifeSpan</Label>
               <TextBox x:Name="lifespanbox" Height="40" Width="600" Text="{Binding XPath=LifeSpan}" FontWeight="UltraBold" FontSize="18"/>
               </StackPanel>               
               <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="4" Height="40" Width="650">
               <Label x:Name="Label6" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="White" Margin="0,0,0,0" 

                 Background="Indigo" FontWeight="UltraBold" FontSize="18">Picture</Label>                 
               <TextBox x:Name="imagebox" Height="40" Width="650" Text="{Binding XPath=Picture}" FontWeight="UltraBold" FontSize="18"/> 
               </StackPanel>
               <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="5" Height="600" Width="650">
                <Image Name="actorimage1" Stretch="Fill" Source="{Binding ElementName=imagebox, Path=Text}" 

                 Height="600" Width="650"/>
               </StackPanel> 
               <StackPanel Orientation="Vertical" Grid.Column="1" Grid.Row="6" Height="150" Width="500">
               <Button x:Name="Save" Background="Black" Foreground="White" Margin="0,0,0,0" Height="50" Width="250"

                 FontWeight="UltraBold" FontSize="16" Click="SaveActorsButton_Click" >No Click</Button>
               <Button x:Name="Save1" Background="Blue" Foreground="White" Height="50" Width="250"

                 FontWeight="UltraBold" FontSize="16">Save New</Button>               
               <Button x:Name="Save2" Background="Violet" Foreground="White" Height="50" Width="250"

                 FontWeight="UltraBold" FontSize="16">Delete Xml</Button>
                                                   
               </StackPanel>
           </Grid>
           </StackPanel>
    </Border>
    <Border BorderBrush="Brown" BorderThickness="5" CornerRadius="4" Panel.ZIndex="0" Margin="0,0,0,0" Grid.Column="2">
               <StackPanel Orientation="Vertical" Height="980" Width="850" Margin="0,0,0,0">
               <ListBox x:Name="xmlbox" Height="960" Width="850" FontWeight="UltraBold" FontSize="18" Margin="0,0,0,0" 

                 HorizontalAlignment="Left"/>
               </StackPanel>   
    </Border> 
</Grid>
</Window>

2.App1.xaml.vb:Path--D:\WPF-1\XmlBinding\

Public Class App1		

Private Sub App1_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)Handles MyBase.Loaded    
    Process.Start("D:\WPF-1\XmlBinding\Bin\Debug\Merge.bat")
    System.Threading.Thread.Sleep(500) 
    Dim R As New IO.StreamReader("D:\WPF-1\XmlBinding\Bin\Debug\Actor2.xml")      
    While (R.Peek() > -1)
    xmlbox.Items.Add(R.ReadLine)
    End While
    R.Close()   
End Sub

Private Sub SaveActorsButton_Click(sender As Object, e As RoutedEventArgs)
			Dim source As String = ActorData.Source.LocalPath
			ActorData.Document.Save(source)
End Sub

Private Sub Save_Click(sender As Object, e As RoutedEventArgs)Handles Save.Click
           
End Sub
 
Private Sub Save1_Click(sender As Object, e As RoutedEventArgs)Handles Save1.Click
    xmlbox.Items.Add("<Actor>" & "<Id>" & idbox.Text & "</Id>" & "<Name>" & namebox.Text & "</Name>" & "<BestFilm>" & bestfilmbox.Text & _
                      "</BestFilm>" & "<LifeSpan>" & lifespanbox.Text & "</LifeSpan>" & "<Picture>" & imagebox.Text & "</Picture>" & "</Actor>")
       System.Threading.Thread.Sleep(500)
       Try
          IO.Directory.CreateDirectory("D:\WPF-1\XmlBinding\Bin\Debug\")                                         
          Dim w As New IO.StreamWriter("D:\WPF-1\XmlBinding\Bin\Debug\" & "Actor2.xml")
          Dim j As Integer         
          For j = 0 To xmlbox.Items.Count - 1
          w.WriteLine(xmlbox.Items.Item(j))
          Next
          w.Close()
       Catch ex As Exception
          MsgBox("File Path not authentic: ")
       End Try  
End Sub

Private Sub Save2_Click(sender As Object, e As RoutedEventArgs)Handles Save2.Click
       xmlbox.Items.RemoveAt(xmlbox.SelectedIndex)
End Sub

End Class

3.Application.xaml:Path--D:\WPF-1\XmlBinding\

<Application x:Class="Application"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    StartupUri="App1.xaml">
    <Application.Resources>
    
    </Application.Resources> 
</Application>

<!--<ResourceDictionary Source="MyResourceDictionary.xaml" />This line is for your info-->

4.Application.xaml.vb:Path--D:\WPF-1\XmlBinding\

Class Application

End Class

5.Driver3.vbproj:Path--D:\WPF-1\XmlBinding\

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>    
    <ProjectGuid>{5FF3DJ6A-4M2M-699G-4DW9-537H6DD3292}</ProjectGuid>   
    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids> 
    <OutputType>WinExe</OutputType>
    <RootNamespace>Driver3</RootNamespace>
    <AssemblyName>Driver3</AssemblyName>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <MyType>Custom</MyType>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <IncrementalBuild>true</IncrementalBuild>
    <OutputPath>Bin\Debug\</OutputPath>    
    <DocumentationFile>Driver3.xml</DocumentationFile>
    <NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <DebugSymbols>false</DebugSymbols>
    <DefineDebug>false</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <IncrementalBuild>True</IncrementalBuild>
    <Optimize>true</Optimize>
    <OutputPath>Bin\Release\</OutputPath>
    <DocumentationFile>Driver3.xml</DocumentationFile>
    <NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
    <AlwaysCompileMarkupFilesInSeparateDomain>true</AlwaysCompileMarkupFilesInSeparateDomain>
  </PropertyGroup>
  <PropertyGroup>
    <OptionExplicit>On</OptionExplicit>
  </PropertyGroup>
  <PropertyGroup>
    <OptionCompare>Binary</OptionCompare>
  </PropertyGroup>
  <PropertyGroup>
    <OptionStrict>Off</OptionStrict>
  </PropertyGroup>
  <PropertyGroup>
    <OptionInfer>On</OptionInfer>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Xaml">
      <RequiredTargetFramework>4.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="WindowsBase" />
    <Reference Include="PresentationCore" />
    <Reference Include="PresentationFramework" />    
  </ItemGroup>  
<ItemGroup>
    <ApplicationDefinition Include="Application.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </ApplicationDefinition>
    <Page Include="App1.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>        
    <Compile Include="Application.xaml.vb">
      <DependentUpon>App.xaml</DependentUpon>
      <SubType>Code</SubType>
    </Compile>
    <Compile Include="App1.xaml.vb">
      <DependentUpon>App1.xaml</DependentUpon>
      <SubType>Code</SubType>
    </Compile>
</ItemGroup>    
<ItemGroup>
    <Content Include="Actors.xml">      
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>    
</ItemGroup> 
 <ItemGroup>
   <Import Include="System.IO"/>
   <Import Include="Microsoft.VisualBasic"/>
   <Import Include="System"/>
   <Import Include="System.Attribute"/>
   <Import Include="System.Collections.Generic"/>
   <Import Include="System.ComponentModel"/>
   <Import Include="System.Data"/>
   <Import Include="System.Diagnostics"/>
   <Import Include="System.Drawing"/>
   <Import Include="System.Linq"/>
   <Import Include="System.Net"/>
   <Import Include="System.Net.WebClient"/>
   <Import Include="System.Object"/>
   <Import Include="System.Runtime.InteropServices"/>
   <Import Include="System.Text"/>
   <Import Include="System.Threading"/>
   <Import Include="System.Threading.Tasks"/>
   <Import Include="System.Web"/>
   <Import Include="System.Windows"/>
   <Import Include="System.Windows.Automation.Peers"/>   
   <Import Include="System.Windows.Controls"/>
   <Import Include="System.Windows.Data"/>
   <Import Include="System.Windows.Documents"/>
   <Import Include="System.Windows.Input"/>
   <Import Include="System.Windows.Media"/>
   <Import Include="System.Windows.Media.Imaging"/>
   <Import Include="System.Windows.Navigation"/>
   <Import Include="System.Windows.Shapes"/>
   <Import Include="System.Windows.Threading"/>
   <Import Include="System.Windows.Threading.DispatcherTimer"/>   
   <Import Include="System.Xml.Linq"/>
   <Import Include="System.Reflection" />
  </ItemGroup>  
  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

6.Actor1.xml:Path--D:\WPF-1\XmlBinding\Bin\Debug

<?xml version="1.0" encoding="utf-8"?>
<Actors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

7.Actor2.xml:Path--D:\WPF-1\XmlBinding\Bin\Debug

<Actor><Id>0001</Id><Name>DevAnand#Dharam Devdutt Pishorimal Anand</Name><BestFilm>Guide</BestFilm><LifeSpan>26thSeptember1923 TO 3rdDecember2011</LifeSpan><Picture>D:\ActorImages\DevAnand.jpg</Picture></Actor>
<Actor><Id>0002</Id><Name>RajKapoor#Ranbir Raj Kapoor</Name><BestFilm>Sangam</BestFilm><LifeSpan>14thDecember1924 TO 2ndJune1988</LifeSpan><Picture>D:\ActorImages\RajKapoor.jpg</Picture></Actor>
<Actor><Id>0003</Id><Name>RajendraKumar#Rajendra Kumar Tuli</Name><BestFilm>Mere Mehboob</BestFilm><LifeSpan>20thJuly1929 TO 12thJuly1999</LifeSpan><Picture>D:\ActorImages\RajendraKumar.jpg</Picture></Actor>
<Actor><Id>0004</Id><Name>RajeshKhanna#Jatin Khanna</Name><BestFilm>Aaradhana</BestFilm><LifeSpan>29thDecember1942 TO 18thJuly2012</LifeSpan><Picture>D:\ActorImages\RajeshKhanna.jpg</Picture></Actor>
<Actor><Id>0005</Id><Name>PrithviRajKapoor#Prithvi Raj Kapoor</Name><BestFilm>Mughale Azam</BestFilm><LifeSpan>3rdNovember1906 TO 29thMay1972</LifeSpan><Picture>D:\ActorImages\PrithviRajKapoor.jpg</Picture></Actor>
<Actor><Id>0006</Id><Name>AshokKumar#Kumudlal Kunjilal Ganguly</Name><BestFilm>Victoria 203</BestFilm><LifeSpan>13thOctober1911 TO 10thDecember2001</LifeSpan><Picture>D:\ActorImages\AshokKumar.jpg</Picture></Actor>
<Actor><Id>0007</Id><Name>GuruDutt#Vasanth Kumar Shivashankar Padukone</Name><BestFilm>Kaakaz Ke Phool</BestFilm><LifeSpan>9thJuly1925 TO 10thOctober1964</LifeSpan><Picture>D:\ActorImages\GuruDutt.jpg</Picture></Actor>
<Actor><Id>0008</Id><Name>RaajKumar#Kulbhushan Pandit</Name><BestFilm>Waqt</BestFilm><LifeSpan>8thOctober1926 TO 3rdJuly1996</LifeSpan><Picture>D:\ActorImages\RaajKumar.jpg</Picture></Actor>
<Actor><Id>0009</Id><Name>KishoreKumar#Abhas Kumar Ganguly </Name><BestFilm>Jhumroo</BestFilm><LifeSpan>4thAugust1929 TO 13thOctober1987</LifeSpan><Picture>D:\ActorImages\KishoreKumar.jpg</Picture></Actor>
<Actor><Id>0010</Id><Name>SunilDutt#Balraj Dutt</Name><BestFilm>Ghumraah</BestFilm><LifeSpan>6thJune1929 TO 25thMay2005</LifeSpan><Picture>D:\ActorImages\SunilDutt.jpg</Picture></Actor>
<Actor><Id>0011</Id><Name>ShammiKapoor#Shamsher Raj Kapoor</Name><BestFilm>Tumsa Nahin Dheka</BestFilm><LifeSpan>21thOctober 1931 TO 14thAugust2011</LifeSpan><Picture>D:\ActorImages\ShammiKapoor.jpg</Picture></Actor>
<Actor><Id>0012</Id><Name>SanjeevKumar#Harihar Jethalal Jariwala</Name><BestFilm>Trishul</BestFilm><LifeSpan>9thJuly 1938 TO 6thNovember1985</LifeSpan><Picture>D:\ActorImages\SanjeevKumar.jpg</Picture></Actor>
<Actor><Id>0013</Id><Name>FerozKhan#Feroz Khan </Name><BestFilm>Mahatma</BestFilm><LifeSpan>25thSeptember1939 TO 27thApril2009</LifeSpan><Picture>D:\ActorImages\FerozKhan.jpg</Picture></Actor>
<Actor><Id>0014</Id><Name>NavinNischol#Navin Nischol </Name><BestFilm>Victoria 203</BestFilm><LifeSpan>11thApril 1946 TO 19thMarch2011</LifeSpan><Picture>D:\ActorImages\NavinNischol.jpg</Picture></Actor>
<Actor><Id>0015</Id><Name>BalrajSahni#Yudhishthir Sahni</Name><BestFilm>Kabuliwala</BestFilm><LifeSpan>1stMay1913 TO 13thApril1973</LifeSpan><Picture>D:\ActorImages\BalrajSahni.jpg</Picture></Actor>
<Actor><Id>0016</Id><Name>DaraSingh#Deedar Singh</Name><BestFilm>Mard</BestFilm><LifeSpan>19thNovember1928 TO 12thJuly2012</LifeSpan><Picture>D:\ActorImages\DaraSingh.jpg</Picture></Actor>
<Actor><Id>0017</Id><Name>UttamKumar# Arun Kumar Chatterjee</Name><BestFilm>Amaanush</BestFilm><LifeSpan>3rdSeptember1920 TO 24thJuly1980</LifeSpan><Picture>D:\ActorImages\UttamKumar.jpg</Picture></Actor>
<Actor><Id>0018</Id><Name>JoyMukherjee#Joy Mukherjee</Name><BestFilm>Ek Musafir Ek Hasina</BestFilm><LifeSpan>24thFebruary1939 TO 9thMarch2012</LifeSpan><Picture>D:\ActorImages\JoyMukherjee.jpg</Picture></Actor>
<Actor><Id>0019</Id><Name>KLSaigal#Kundan Lal Saigal</Name><BestFilm>Street Singer</BestFilm><LifeSpan>11thApril1904 TO 18thJanuary1947</LifeSpan><Picture>D:\ActorImages\KLSaigal.jpg</Picture></Actor>
<Actor><Id>0020</Id><Name>Ajit#Hamid Ali Khan</Name><BestFilm>Sone Ki Chidiya</BestFilm><LifeSpan>27thJanuary1922 TO 22thOctober1998</LifeSpan><Picture>D:\ActorImages\Ajit.jpg</Picture></Actor>
<Actor><Id>0021</Id><Name>DilipKumar# Muhammad Yusuf Khan</Name><BestFilm>Mughal-e-Azam</BestFilm><LifeSpan>Born:12thDecember1922 (age 92)</LifeSpan><Picture>D:\ActorImages\DilipKumar.jpg</Picture></Actor>
<Actor><Id>0022</Id><Name>Dharmendra#Dharam Singh Deol</Name><BestFilm>Yaadon Ki Baaraath</BestFilm><LifeSpan>Born:8thDecember1935 (age 80)</LifeSpan><Picture>D:\ActorImages\Dharmendra.jpg</Picture></Actor>
<Actor><Id>0023</Id><Name>Biswajit#Biswajit Ranjitkumar Chatterjee</Name><BestFilm>Bees Saal Baad</BestFilm><LifeSpan>Born:14thDecember1936 (age 79)</LifeSpan><Picture>D:\ActorImages\Biswajit.jpg</Picture></Actor>
<Actor><Id>0024</Id><Name>ManojKumar#Harikrishna Giri Goswami</Name><BestFilm>Upkaar</BestFilm><LifeSpan>Born:24thJuly1937 (age 78)</LifeSpan><Picture>D:\ActorImages\ManojKumar.jpg</Picture></Actor>
<Actor><Id>0025</Id><Name>ShashiKapoor#Balbir Raj Prithviraj Kapoor</Name><BestFilm>Haseena Maan Jayegi</BestFilm><LifeSpan>Born:18 March 1938 (age 77)</LifeSpan><Picture>D:\ActorImages\ShashiKapoor.jpg</Picture></Actor>
<Actor><Id>0026</Id><Name>Jeetendra#Ravi Kapoor</Name><BestFilm>Parichay</BestFilm><LifeSpan>Born:7thApril1942 (age 73)</LifeSpan><Picture>C:\Users\VEKATRAMAN\Desktop\Images\Jeetendra.jpg</Picture></Actor>
<Actor><Id>0027</Id><Name>AmitabhBachchan#Amitabh Harivansh Rai Bachchan</Name><BestFilm>Trishul</BestFilm><LifeSpan>Born:11thOctober1942 (age 72)</LifeSpan><Picture>D:\ActorImages\AmitabhBachchan.jpg</Picture></Actor>
<Actor><Id>0028</Id><Name>ShatrughanSinha#Shatrughan Sinha</Name><BestFilm>Dhost</BestFilm><LifeSpan>Born:9thDecember1945 (age 69)</LifeSpan><Picture>D:\ActorImages\ShatrughanSinha.jpg</Picture></Actor>
<Actor><Id>0029</Id><Name>Akshay Kumar#Rajiv Hari Om Bhatia</Name><BestFilm>Singh Is King</BestFilm><LifeSpan>Born:9thSeptember1967 (age 47)</LifeSpan><Picture>D:\ActorImages\AkshayKumar.jpg</Picture></Actor>
<Actor><Id>0030</Id><Name>ShahRukhKhan#Shahrukh Khan</Name><BestFilm>Chennai Express</BestFilm><LifeSpan>Born:2ndNovember1965 (age 50)</LifeSpan><Picture>D:\ActorImages\ShahRukhKhan.jpg</Picture></Actor>
<Actor><Id>0031</Id><Name>SalmanKhan#Abdul Rashid Salim Salman Khan</Name><BestFilm>Baghbaan</BestFilm><LifeSpan>Born:2ndNovember1965 (age 50)</LifeSpan><Picture>D:\ActorImages\SalmanKhan.jpg</Picture></Actor>
<Actor><Id>0032</Id><Name>HrithikRoshan#Hrithik Roshan</Name><BestFilm>Krrish</BestFilm><LifeSpan>Born:10thJanuary1974 (age 41)</LifeSpan><Picture>D:\ActorImages\HrithikRoshan.jpg</Picture></Actor>
<Actor><Id>0033</Id><Name>AamirKhan#Mohammed Aamir Hussain Khan</Name><BestFilm>3Idiots</BestFilm><LifeSpan>Born:14thMarch1965 (age 50)</LifeSpan><Picture>D:\ActorImages\AamirKhan.jpg</Picture></Actor>
<Actor><Id>0034</Id><Name>JackieShroff#Jaikishen Kakubhai Shroff</Name><BestFilm>Hero</BestFilm><LifeSpan>Born:14thMarch1965 (age 50)</LifeSpan><Picture>D:\ActorImages\JackieShroff.jpg</Picture></Actor>
<Actor><Id>0035</Id><Name>Govinda#Govind Arun Ahuja</Name><BestFilm>Bade Miyan Chote Mian</BestFilm><LifeSpan>Born:21stDecember1963 (age 52)</LifeSpan><Picture>D:\ActorImages\Govinda.jpg</Picture></Actor>
<Actor><Id>0036</Id><Name>SanjayDutt#Sanjay Balraj Dutt</Name><BestFilm>Shoot Out At Lokhandwala</BestFilm><LifeSpan>Born:29thJuly1959 (age 56)</LifeSpan><Picture>D:\ActorImages\SanjayDutt.jpg</Picture></Actor>
<Actor><Id>0037</Id><Name>AjayDevgan#Vishal Veeru Devgan</Name><BestFilm>Apaharn</BestFilm><LifeSpan>Born:2ndApril1969 (age 46)</LifeSpan><Picture>D:\ActorImages\AjayDevgan.jpg</Picture></Actor>
<Actor><Id>0038</Id><Name>SaifAliKhan#Sajid Ali Khan</Name><BestFilm>Kal Ho Naa Ho</BestFilm><LifeSpan>Born:16thAugust1970 (age 45)</LifeSpan><Picture>D:\ActorImages\SaifAliKhan.jpg</Picture></Actor>
<Actor><Id>0039</Id><Name>SunilShetty#Sunil Shetty</Name><BestFilm>Shoot Out At Lokhandwala</BestFilm><LifeSpan>Born:11thAugust1961 (age 54)</LifeSpan><Picture>D:\ActorImages\SunilShetty.jpg</Picture></Actor>
<Actor><Id>0040</Id><Name>AbhishekBachchan#Abhishek Bachchan</Name><BestFilm>Sarkar</BestFilm><LifeSpan>Born:5thFebruary1976 (age 39)</LifeSpan><Picture>D:\ActorImages\AbhishekBachchan.jpg</Picture></Actor>
<Actor><Id>0041</Id><Name>FarooqSheikh#Farooq Sheikh</Name><BestFilm>Umrao Jaan</BestFilm><LifeSpan>25thMarch1948 TO 27thDecember2013</LifeSpan><Picture>D:\ActorImages\FarooqSheikh.jpg</Picture></Actor>
<Actor><Id>0042</Id><Name>RaajBabbar#Raaj Babbar</Name><BestFilm>Nikaah</BestFilm><LifeSpan>Born:23rdJune1952 (age 63)</LifeSpan><Picture>D:\ActorImages\RaajBabbar.jpg</Picture></Actor>
<Actor><Id>0043</Id><Name>VinodKhanna#Vinod Khanna</Name><BestFilm>Mahatma</BestFilm><LifeSpan>Born:6thOctober1946 (age 68)</LifeSpan><Picture>D:\ActorImages\VinodKhanna.jpg</Picture></Actor>
<Actor><Id>0044</Id><Name>MithunChakraborty#Gouranga Chakraborty</Name><BestFilm>Agneepath</BestFilm><LifeSpan>Born:16thJune1950 (age 65)</LifeSpan><Picture>D:\ActorImages\MithunChakraborty.jpg</Picture></Actor>
<Actor><Id>0045</Id><Name>RishiKapoor#Rishi Kapoor</Name><BestFilm>Amar Akbar Anthony</BestFilm><LifeSpan>Born:4thSeptember1952 (age 63)</LifeSpan><Picture>D:\ActorImages\RishiKapoor.jpg</Picture></Actor>
<Actor><Id>0046</Id><Name>RandhirKapoor#Randhir Kapoor</Name><BestFilm>Rampur Ka Lakshman</BestFilm><LifeSpan>Born:15thFebruary1947 (age 68)</LifeSpan><Picture>D:\ActorImages\\RandhirKapoor.jpg</Picture></Actor>
<Actor><Id>0047</Id><Name>AnilKapoor#Anil Kapoor</Name><BestFilm>Mr.India</BestFilm><LifeSpan>Born:24thDecember1956 (age 58)</LifeSpan><Picture>D:\ActorImages\\AnilKapoor.jpg</Picture></Actor>
<Actor><Id>0048</Id><Name>DeepakParashar#Deepak Parashar</Name><BestFilm>Nikaah</BestFilm><LifeSpan>Born:2ndApril1952 (age 63)</LifeSpan><Picture>D:\ActorImages\\DeepakParashar.jpg</Picture></Actor>
<Actor><Id>0049</Id><Name>RanbirKapoor#Ranbir Kapoor</Name><BestFilm>Ajab Prem Ki Ghazab Kahani</BestFilm><LifeSpan>Born:28thSeptember1982 (age 32)</LifeSpan><Picture>D:\ActorImages\\RanbirKapoor.jpg</Picture></Actor>
<Actor><Id>0050</Id><Name>EmraanHashmi#Emraan Anwar Hashmi</Name><BestFilm>Awarapan</BestFilm><LifeSpan>Born:24thMarch1979 (age 36)</LifeSpan><Picture>D:\ActorImages\\EmraanHashmi.jpg</Picture></Actor>
<Actor><Id>0051</Id><Name>AmolPalekar#Amol Palekar</Name><BestFilm>Choti Si Baat</BestFilm><LifeSpan>Born:24thNovember1944 (age 70)</LifeSpan><Picture>D:\ActorImages\AmolPalekar.jpg</Picture></Actor>

8.Actor3.xml:Path--D:\WPF-1\XmlBinding\Bin\Debug

</Actors>

9.Actors.xml:Path--D:\WPF-1\XmlBinding\Bin\Debug

<?xml version="1.0" encoding="utf-8"?>
<Actors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Actor><Id>0001</Id><Name>DevAnand#Dharam Devdutt Pishorimal Anand</Name><BestFilm>Guide</BestFilm><LifeSpan>26thSeptember1923 TO 3rdDecember2011</LifeSpan><Picture>D:\ActorImages\DevAnand.jpg</Picture></Actor>
<Actor><Id>0002</Id><Name>RajKapoor#Ranbir Raj Kapoor</Name><BestFilm>Sangam</BestFilm><LifeSpan>14thDecember1924 TO 2ndJune1988</LifeSpan><Picture>D:\ActorImages\RajKapoor.jpg</Picture></Actor>
<Actor><Id>0003</Id><Name>RajendraKumar#Rajendra Kumar Tuli</Name><BestFilm>Mere Mehboob</BestFilm><LifeSpan>20thJuly1929 TO 12thJuly1999</LifeSpan><Picture>D:\ActorImages\RajendraKumar.jpg</Picture></Actor>
<Actor><Id>0004</Id><Name>RajeshKhanna#Jatin Khanna</Name><BestFilm>Aaradhana</BestFilm><LifeSpan>29thDecember1942 TO 18thJuly2012</LifeSpan><Picture>D:\ActorImages\RajeshKhanna.jpg</Picture></Actor>
<Actor><Id>0005</Id><Name>PrithviRajKapoor#Prithvi Raj Kapoor</Name><BestFilm>Mughale Azam</BestFilm><LifeSpan>3rdNovember1906 TO 29thMay1972</LifeSpan><Picture>D:\ActorImages\PrithviRajKapoor.jpg</Picture></Actor>
<Actor><Id>0006</Id><Name>AshokKumar#Kumudlal Kunjilal Ganguly</Name><BestFilm>Victoria 203</BestFilm><LifeSpan>13thOctober1911 TO 10thDecember2001</LifeSpan><Picture>D:\ActorImages\AshokKumar.jpg</Picture></Actor>
<Actor><Id>0007</Id><Name>GuruDutt#Vasanth Kumar Shivashankar Padukone</Name><BestFilm>Kaakaz Ke Phool</BestFilm><LifeSpan>9thJuly1925 TO 10thOctober1964</LifeSpan><Picture>D:\ActorImages\GuruDutt.jpg</Picture></Actor>
<Actor><Id>0008</Id><Name>RaajKumar#Kulbhushan Pandit</Name><BestFilm>Waqt</BestFilm><LifeSpan>8thOctober1926 TO 3rdJuly1996</LifeSpan><Picture>D:\ActorImages\RaajKumar.jpg</Picture></Actor>
<Actor><Id>0009</Id><Name>KishoreKumar#Abhas Kumar Ganguly </Name><BestFilm>Jhumroo</BestFilm><LifeSpan>4thAugust1929 TO 13thOctober1987</LifeSpan><Picture>D:\ActorImages\KishoreKumar.jpg</Picture></Actor>
<Actor><Id>0010</Id><Name>SunilDutt#Balraj Dutt</Name><BestFilm>Ghumraah</BestFilm><LifeSpan>6thJune1929 TO 25thMay2005</LifeSpan><Picture>D:\ActorImages\SunilDutt.jpg</Picture></Actor>
<Actor><Id>0011</Id><Name>ShammiKapoor#Shamsher Raj Kapoor</Name><BestFilm>Tumsa Nahin Dheka</BestFilm><LifeSpan>21thOctober 1931 TO 14thAugust2011</LifeSpan><Picture>D:\ActorImages\ShammiKapoor.jpg</Picture></Actor>
<Actor><Id>0012</Id><Name>SanjeevKumar#Harihar Jethalal Jariwala</Name><BestFilm>Trishul</BestFilm><LifeSpan>9thJuly 1938 TO 6thNovember1985</LifeSpan><Picture>D:\ActorImages\SanjeevKumar.jpg</Picture></Actor>
<Actor><Id>0013</Id><Name>FerozKhan#Feroz Khan </Name><BestFilm>Mahatma</BestFilm><LifeSpan>25thSeptember1939 TO 27thApril2009</LifeSpan><Picture>D:\ActorImages\FerozKhan.jpg</Picture></Actor>
<Actor><Id>0014</Id><Name>NavinNischol#Navin Nischol </Name><BestFilm>Victoria 203</BestFilm><LifeSpan>11thApril 1946 TO 19thMarch2011</LifeSpan><Picture>D:\ActorImages\NavinNischol.jpg</Picture></Actor>
<Actor><Id>0015</Id><Name>BalrajSahni#Yudhishthir Sahni</Name><BestFilm>Kabuliwala</BestFilm><LifeSpan>1stMay1913 TO 13thApril1973</LifeSpan><Picture>D:\ActorImages\BalrajSahni.jpg</Picture></Actor>
<Actor><Id>0016</Id><Name>DaraSingh#Deedar Singh</Name><BestFilm>Mard</BestFilm><LifeSpan>19thNovember1928 TO 12thJuly2012</LifeSpan><Picture>D:\ActorImages\DaraSingh.jpg</Picture></Actor>
<Actor><Id>0017</Id><Name>UttamKumar# Arun Kumar Chatterjee</Name><BestFilm>Amaanush</BestFilm><LifeSpan>3rdSeptember1920 TO 24thJuly1980</LifeSpan><Picture>D:\ActorImages\UttamKumar.jpg</Picture></Actor>
<Actor><Id>0018</Id><Name>JoyMukherjee#Joy Mukherjee</Name><BestFilm>Ek Musafir Ek Hasina</BestFilm><LifeSpan>24thFebruary1939 TO 9thMarch2012</LifeSpan><Picture>D:\ActorImages\JoyMukherjee.jpg</Picture></Actor>
<Actor><Id>0019</Id><Name>KLSaigal#Kundan Lal Saigal</Name><BestFilm>Street Singer</BestFilm><LifeSpan>11thApril1904 TO 18thJanuary1947</LifeSpan><Picture>D:\ActorImages\KLSaigal.jpg</Picture></Actor>
<Actor><Id>0020</Id><Name>Ajit#Hamid Ali Khan</Name><BestFilm>Sone Ki Chidiya</BestFilm><LifeSpan>27thJanuary1922 TO 22thOctober1998</LifeSpan><Picture>D:\ActorImages\Ajit.jpg</Picture></Actor>
<Actor><Id>0021</Id><Name>DilipKumar# Muhammad Yusuf Khan</Name><BestFilm>Mughal-e-Azam</BestFilm><LifeSpan>Born:12thDecember1922 (age 92)</LifeSpan><Picture>D:\ActorImages\DilipKumar.jpg</Picture></Actor>
<Actor><Id>0022</Id><Name>Dharmendra#Dharam Singh Deol</Name><BestFilm>Yaadon Ki Baaraath</BestFilm><LifeSpan>Born:8thDecember1935 (age 80)</LifeSpan><Picture>D:\ActorImages\Dharmendra.jpg</Picture></Actor>
<Actor><Id>0023</Id><Name>Biswajit#Biswajit Ranjitkumar Chatterjee</Name><BestFilm>Bees Saal Baad</BestFilm><LifeSpan>Born:14thDecember1936 (age 79)</LifeSpan><Picture>D:\ActorImages\Biswajit.jpg</Picture></Actor>
<Actor><Id>0024</Id><Name>ManojKumar#Harikrishna Giri Goswami</Name><BestFilm>Upkaar</BestFilm><LifeSpan>Born:24thJuly1937 (age 78)</LifeSpan><Picture>D:\ActorImages\ManojKumar.jpg</Picture></Actor>
<Actor><Id>0025</Id><Name>ShashiKapoor#Balbir Raj Prithviraj Kapoor</Name><BestFilm>Haseena Maan Jayegi</BestFilm><LifeSpan>Born:18 March 1938 (age 77)</LifeSpan><Picture>D:\ActorImages\ShashiKapoor.jpg</Picture></Actor>
<Actor><Id>0026</Id><Name>Jeetendra#Ravi Kapoor</Name><BestFilm>Parichay</BestFilm><LifeSpan>Born:7thApril1942 (age 73)</LifeSpan><Picture>C:\Users\VEKATRAMAN\Desktop\Images\Jeetendra.jpg</Picture></Actor>
<Actor><Id>0027</Id><Name>AmitabhBachchan#Amitabh Harivansh Rai Bachchan</Name><BestFilm>Trishul</BestFilm><LifeSpan>Born:11thOctober1942 (age 72)</LifeSpan><Picture>D:\ActorImages\AmitabhBachchan.jpg</Picture></Actor>
<Actor><Id>0028</Id><Name>ShatrughanSinha#Shatrughan Sinha</Name><BestFilm>Dhost</BestFilm><LifeSpan>Born:9thDecember1945 (age 69)</LifeSpan><Picture>D:\ActorImages\ShatrughanSinha.jpg</Picture></Actor>
<Actor><Id>0029</Id><Name>Akshay Kumar#Rajiv Hari Om Bhatia</Name><BestFilm>Singh Is King</BestFilm><LifeSpan>Born:9thSeptember1967 (age 47)</LifeSpan><Picture>D:\ActorImages\AkshayKumar.jpg</Picture></Actor>
<Actor><Id>0030</Id><Name>ShahRukhKhan#Shahrukh Khan</Name><BestFilm>Chennai Express</BestFilm><LifeSpan>Born:2ndNovember1965 (age 50)</LifeSpan><Picture>D:\ActorImages\ShahRukhKhan.jpg</Picture></Actor>
<Actor><Id>0031</Id><Name>SalmanKhan#Abdul Rashid Salim Salman Khan</Name><BestFilm>Baghbaan</BestFilm><LifeSpan>Born:2ndNovember1965 (age 50)</LifeSpan><Picture>D:\ActorImages\SalmanKhan.jpg</Picture></Actor>
<Actor><Id>0032</Id><Name>HrithikRoshan#Hrithik Roshan</Name><BestFilm>Krrish</BestFilm><LifeSpan>Born:10thJanuary1974 (age 41)</LifeSpan><Picture>D:\ActorImages\HrithikRoshan.jpg</Picture></Actor>
<Actor><Id>0033</Id><Name>AamirKhan#Mohammed Aamir Hussain Khan</Name><BestFilm>3Idiots</BestFilm><LifeSpan>Born:14thMarch1965 (age 50)</LifeSpan><Picture>D:\ActorImages\AamirKhan.jpg</Picture></Actor>
<Actor><Id>0034</Id><Name>JackieShroff#Jaikishen Kakubhai Shroff</Name><BestFilm>Hero</BestFilm><LifeSpan>Born:14thMarch1965 (age 50)</LifeSpan><Picture>D:\ActorImages\JackieShroff.jpg</Picture></Actor>
<Actor><Id>0035</Id><Name>Govinda#Govind Arun Ahuja</Name><BestFilm>Bade Miyan Chote Mian</BestFilm><LifeSpan>Born:21stDecember1963 (age 52)</LifeSpan><Picture>D:\ActorImages\Govinda.jpg</Picture></Actor>
<Actor><Id>0036</Id><Name>SanjayDutt#Sanjay Balraj Dutt</Name><BestFilm>Shoot Out At Lokhandwala</BestFilm><LifeSpan>Born:29thJuly1959 (age 56)</LifeSpan><Picture>D:\ActorImages\SanjayDutt.jpg</Picture></Actor>
<Actor><Id>0037</Id><Name>AjayDevgan#Vishal Veeru Devgan</Name><BestFilm>Apaharn</BestFilm><LifeSpan>Born:2ndApril1969 (age 46)</LifeSpan><Picture>D:\ActorImages\AjayDevgan.jpg</Picture></Actor>
<Actor><Id>0038</Id><Name>SaifAliKhan#Sajid Ali Khan</Name><BestFilm>Kal Ho Naa Ho</BestFilm><LifeSpan>Born:16thAugust1970 (age 45)</LifeSpan><Picture>D:\ActorImages\SaifAliKhan.jpg</Picture></Actor>
<Actor><Id>0039</Id><Name>SunilShetty#Sunil Shetty</Name><BestFilm>Shoot Out At Lokhandwala</BestFilm><LifeSpan>Born:11thAugust1961 (age 54)</LifeSpan><Picture>D:\ActorImages\SunilShetty.jpg</Picture></Actor>
<Actor><Id>0040</Id><Name>AbhishekBachchan#Abhishek Bachchan</Name><BestFilm>Sarkar</BestFilm><LifeSpan>Born:5thFebruary1976 (age 39)</LifeSpan><Picture>D:\ActorImages\AbhishekBachchan.jpg</Picture></Actor>
<Actor><Id>0041</Id><Name>FarooqSheikh#Farooq Sheikh</Name><BestFilm>Umrao Jaan</BestFilm><LifeSpan>25thMarch1948 TO 27thDecember2013</LifeSpan><Picture>D:\ActorImages\FarooqSheikh.jpg</Picture></Actor>
<Actor><Id>0042</Id><Name>RaajBabbar#Raaj Babbar</Name><BestFilm>Nikaah</BestFilm><LifeSpan>Born:23rdJune1952 (age 63)</LifeSpan><Picture>D:\ActorImages\RaajBabbar.jpg</Picture></Actor>
<Actor><Id>0043</Id><Name>VinodKhanna#Vinod Khanna</Name><BestFilm>Mahatma</BestFilm><LifeSpan>Born:6thOctober1946 (age 68)</LifeSpan><Picture>D:\ActorImages\VinodKhanna.jpg</Picture></Actor>
<Actor><Id>0044</Id><Name>MithunChakraborty#Gouranga Chakraborty</Name><BestFilm>Agneepath</BestFilm><LifeSpan>Born:16thJune1950 (age 65)</LifeSpan><Picture>D:\ActorImages\MithunChakraborty.jpg</Picture></Actor>
<Actor><Id>0045</Id><Name>RishiKapoor#Rishi Kapoor</Name><BestFilm>Amar Akbar Anthony</BestFilm><LifeSpan>Born:4thSeptember1952 (age 63)</LifeSpan><Picture>D:\ActorImages\RishiKapoor.jpg</Picture></Actor>
<Actor><Id>0046</Id><Name>RandhirKapoor#Randhir Kapoor</Name><BestFilm>Rampur Ka Lakshman</BestFilm><LifeSpan>Born:15thFebruary1947 (age 68)</LifeSpan><Picture>D:\ActorImages\\RandhirKapoor.jpg</Picture></Actor>
<Actor><Id>0047</Id><Name>AnilKapoor#Anil Kapoor</Name><BestFilm>Mr.India</BestFilm><LifeSpan>Born:24thDecember1956 (age 58)</LifeSpan><Picture>D:\ActorImages\\AnilKapoor.jpg</Picture></Actor>
<Actor><Id>0048</Id><Name>DeepakParashar#Deepak Parashar</Name><BestFilm>Nikaah</BestFilm><LifeSpan>Born:2ndApril1952 (age 63)</LifeSpan><Picture>D:\ActorImages\\DeepakParashar.jpg</Picture></Actor>
<Actor><Id>0049</Id><Name>RanbirKapoor#Ranbir Kapoor</Name><BestFilm>Ajab Prem Ki Ghazab Kahani</BestFilm><LifeSpan>Born:28thSeptember1982 (age 32)</LifeSpan><Picture>D:\ActorImages\\RanbirKapoor.jpg</Picture></Actor>
<Actor><Id>0050</Id><Name>EmraanHashmi#Emraan Anwar Hashmi</Name><BestFilm>Awarapan</BestFilm><LifeSpan>Born:24thMarch1979 (age 36)</LifeSpan><Picture>D:\ActorImages\\EmraanHashmi.jpg</Picture></Actor>
<Actor><Id>0051</Id><Name>AmolPalekar#Amol Palekar</Name><BestFilm>Choti Si Baat</BestFilm><LifeSpan>Born:24thNovember1944 (age 70)</LifeSpan><Picture>D:\ActorImages\AmolPalekar.jpg</Picture></Actor>
</Actors>

NOTE:One copy of this Actors.xaml with just the top two lines only must be placed in theXmlBinding folder.Otherwise Driver will not recognise. That file will not be updated!?!WHY?-GOK-God only knows!!

ActorImages folder to be kept in "D:\" drive(Do not forget)

10.Merge.bat:Path--D:\WPF-1\XmlBinding\Bin\Debug

@echo off
setlocal enabledelayedexpansion
break>Actors.xml
setlocal enabledelayedexpansion
for /f "tokens=*" %%A in (Actor1.xml) do (

echo %%A>>Actors.xml)

setlocal enabledelayedexpansion
for /f "tokens=*" %%A in (Actor2.xml) do (

echo %%A>>Actors.xml)

setlocal enabledelayedexpansion
GOTO start1

:start1


for /f "tokens=*" %%A in (Actor3.xml) do (

echo %%A>>Actors.xml)
@Exit

How to Make New Entries

Very simple.There are two ways to do this.

  1. Directly write to the Actor2.xml file-the extended elements.If you do this just click the Merge.bat once to update.
  2. There are TextBoxes provided on top(They do double work of showing the info) for this in the apps.Just write the entries and Click the "Save New" button.

IMPORTANT:-You will have to restart the apps twice to get the desired changes.

happy coding,
and plenty of blessings,
K.Venkatraman(aka)kvinvisibleguy

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

kvinvisibleguy
Retired Kamadhenu Additives & Chemicals
India India
Staying At present in Bangalore-India.
Retired as Paint Manufacturing Consultant.
I did my Chemical Engineering from Osmania University-Hyderabad-Andhrapradesh(Now Telengana)-India
First I sarted my carrier in 1971 with ICI paint CO as Superindent,Manufacturing-14 years.
I worked as General Manager in SouthField Paints in Bangalore-2 years.Here i developed paints for
Aircrafts-mostly jet fighters(Defence).
Then came a stint of Paints manufacturing-6 years.
I was paint manufacturing consultant for 12 years.
Retired from working career in 2005.
At present Self employed-Making additive for Paint Industry'.
Learnt Basics of Computer from my Grandson in 2005 only.
Programming is my hobby.
Proficient in Visual C++,VB.Net,Html,xml,Bat,Python.A little of php.
Trying my hand at more things.
At my best in WPF VB.Net C-Pad Style.
C-Pad style is solely my creation.
My usual articles are at:-
**************************************************************************************
http://www.dreamincode.net/forums/topic/370955-wpf-helper/page__pid__2124851__st__0�entry2124851

Page1 DreamInCode

http://www.dreamincode.net/forums/topic/370955-wpf-helper/page__st__15__gopid__2129630�entry2129630

Page2 DreamInCode

http://www.dreamincode.net/forums/topic/370955-wpf-helper/page__st__30

Page3 DreamInCode
**************************************************************************************

You may also be interested in...

Comments and Discussions

 
QuestionList of improvements... Pin
Super Lloyd22-Nov-15 14:23
memberSuper Lloyd22-Nov-15 14:23 

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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170624.1 | Last Updated 30 Sep 2015
Article Copyright 2015 by kvinvisibleguy
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid