Thursday, March 29, 2007

USING XML WITH VBNET



XML File Parsing in VB.NET - The Code Project - VB.NET



Introduction


Parsing XML files has always been time consuming and
sometimes tricky. .NET framework provides powerful new ways of parsing
XML. The various techniques know to parse xml files with .NET framework
are using XmlTextReader, XmlDocument, XmlSerializer, DataSet and XpathDocument. I will explore the XmlTextReader and XmlDocument approach here.


The Xml File


Figure 1 outlines the xml file that will be parsed.

<?xml version="1.0" encoding="UTF-8"?>

<family>

<name gender="Male">

<firstname>Tom</firstname>

<lastname>Smith</lastname>

</name>

<name gender="Female">

<firstname>Dale</firstname>

<lastname>Smith</lastname>

</name>

</family>

Figure1: Xml file

Parsing XML with XMLTextReader


Using XmlTextReader is appropriate when the structure of the XML file is relatively simple. Parsing with XmlTextReader gives you a pre .net feel as you sequentially walk through the file using Read() and get data using GetAttribute() andReadElementString() methods. Thus while using XmlTextReader it is up to the developer to keep track where he is in the Xml file and Read() correctly. Figure 2 below outlines parsing of xml file with XmlTextReader

Collapse
Imports System.IO

Imports System.Xml

Module ParsingUsingXmlTextReader

Sub Main()

Dim m_xmlr As XmlTextReader

'Create the XML Reader

m_xmlr = New XmlTextReader("C:\Personal\family.xml")

'Disable whitespace so that you don't have to read over whitespaces

m_xmlr.WhiteSpaceHandling = WhiteSpaceHandling.NONE

'read the xml declaration and advance to family tag

m_xmlr.Read()

'read the family tag

m_xmlr.Read()

'Load the Loop

While Not m_xmlr.EOF

'Go to the name tag

m_xmlr.Read()

'if not start element exit while loop

If Not m_xmlr.IsStartElement() Then

Exit While

End If

'Get the Gender Attribute Value

Dim genderAttribute = m_xmlr.GetAttribute("gender")

'Read elements firstname and lastname

m_xmlr.Read()

'Get the firstName Element Value

Dim firstNameValue = m_xmlr.ReadElementString("firstname")

'Get the lastName Element Value

Dim lastNameValue = m_xmlr.ReadElementString("lastname")

'Write Result to the Console

Console.WriteLine("Gender: " & genderAttribute _

& " FirstName: " & firstNameValue & " LastName: " _

& lastNameValue)

Console.Write(vbCrLf)

End While

'close the reader

m_xmlr.Close()

End Sub

End Module

Figure 2: Xml Parsing with XmlTextReader

Parsing XML with XmlDocument


The XmlDocument class is modeled based on Document Object Model. XmlDocument class is appropriate if you need to extract data in a non-sequential manner. Figure 3 below outlines parsing of xml file with XmlDocument

Collapse
Imports System.IO

Imports System.Xml

Module ParsingUsingXmlDocument

Sub Main()

Try

Dim m_xmld As XmlDocument

Dim m_nodelist As XmlNodeList

Dim m_node As XmlNode

'Create the XML Document

m_xmld = New XmlDocument()

'Load the Xml file

m_xmld.Load("C:\CMS\Personal\family.xml")

'Get the list of name nodes

m_nodelist = m_xmld.SelectNodes("/family/name")

'Loop through the nodes

For Each m_node In m_nodelist

'Get the Gender Attribute Value

Dim genderAttribute = m_node.Attributes.GetNamedItem("gender").Value

'Get the firstName Element Value

Dim firstNameValue = m_node.ChildNodes.Item(0).InnerText

'Get the lastName Element Value

Dim lastNameValue = m_node.ChildNodes.Item(1).InnerText

'Write Result to the Console

Console.Write("Gender: " & genderAttribute _

& " FirstName: " & firstNameValue & " LastName: " _

& lastNameValue)

Console.Write(vbCrLf)

Next

Catch errorVariable As Exception

'Error trapping

Console.Write(errorVariable.ToString())

End Try

End Sub

End Module

Figure 3: Xml Parsing with XmlDocument

Compilation and Result


Make sure you have vbc.exe in your path. From the command prompt go to C:\Personal>. Compile ParsingUsingXmlTextReader.vb and ParsingUsingXmlDocument.vb.

C:\Personal>vbc /out:ParsingUsingXmlTextReadervb.exe ParsingUsingXmlTextReader.vb

C:\Personal>vbc /out:ParsingUsingXmlDocumentvb.exe ParsingUsingXmlDocument.vb

When you run the individual program

C:\Personal>ParsingUsingXmlTextReadervb.exe 

OR

C:\Personal>ParsingUsingXmlDocumentvb.exe

You will see the following result for both

Gender: Male FirstName: Tom LastName: Smith



Gender: Female FirstName: Dale LastName: Smith

Conclusion


There are different ways to parse XML files and the best method depends on your situation and the programming style preferred.

then using dataset

Using DataSet is simple..

In the code behind add the following lines.



Dim myDataSet as New DataSet()

myDataSet.ReadXml(Server.MapPath("xmlfilename.xml"))

datagrid1.DataSource = myDataSet

datagrid1.DataBind()



In the aspx page add the following..

<asp:datagrid id="datagrid1" runat="server"

                AutoGenerateColumns="False"

                Font-Name="Verdana"

                Font-Size="Small"

                HorizontalAlign="Center">

      <Columns>

        <asp:BoundColumn HeaderText="First Name" DataField="firstname" />

        <asp:BoundColumn HeaderText="Last Name" DataField="lastname" />  

      </Columns>

  </asp:datagrid>






Powered by ScribeFire.

Monter et configurer un PC nouvelle génération

Source: Monter et configurer un PC nouvelle génération

 

Monter et configurer un PC nouvelle génération

Monter et configurer un PC nouvelle génération

Introduction et recommandationsBoîtier, alimentation et carte mèreProcesseur, pâte thermique et radiateur/ventilateurMémoire et carte graphiqueDisques durs, lecteurs/graveur optiques et lecteur de disquetteBranchements de la connectique : 1ère partieBranchements de la connectique : 2ème partieL'heure fatidique...Configuration d'un système RAIDInstaller Windows XPInstallation de Windows Vista et mots de la fin
Ordinateur personnel

Configuration de référence Ultra

Envie de jouer au Docteur Frankenstein pour donner vie à votre propre PC ? À moins que vous ne préfériez pratiquer une opération à cœur ouvert pour mettre à jour celui que vous possédez déjà, mais qui semble à bout de souffle ? Oui, vous aussi vous avez le droit de vous amuser !
Nous allons donc vous proposer ici un guide complet pour vous aider à mettre sur pied votre « bête high-tech » de nouvelle génération avec explications, photos et vidéos à l'appui !
Après avoir trouvé le financement nécessaire et sélectionné avec soins vos composants (pour cela, les configurations de référence et le guide d'achat de Noël 2006 peuvent vous simplifier la tâche), saisissez votre tournevis d'une main ferme et décidée, fixez votre écran / vos notes... C'est parti !

Petites recommandations avant de commencer

Avant de mettre les mains dans le « cambouis » à proprement parler (rassurez-vous, vous ne devriez pas trop vous salir ni trop vous écorcher), voici quelques conseils pour que le montage se déroule dans les meilleures conditions qui soient.

Montage PC - Tourne vis

Tout d'abord, placez votre machine au sol ou en hauteur. Évitez à tout prix la moquette ou autre revêtement pouvant générer de l'électricité statique, les composants informatiques n'appréciant guère. Le mieux est de se placer sur une grande table bien stable. Préparez vos outils (tournevis principalement), instructions (article, manuels d'instructions) et composants nécessaires.
(Re)lisez attentivement nos instructions et visionnez (plusieurs fois si nécessaire) nos vidéos. Ne vous énervez pas, ne soyez pas trop brusque, ne buvez pas et ne mangez pas au-dessus de l'ordinateur pendant le montage et n'oubliez pas de respirer. En cas de gros doute, n'hésitez pas à interroger vos proches ou alors les Clubicien(ne)s sur le forum !

Page précédente Page précédente

Pages 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11

Page suivante Page suivante

Free Software Downloads To read RSS feeds

 Source: Free Software Downloads - WebmasterFree.com

 

Betsaka ny logiciel ahafahana mamaky fil RSS. Ary ireo browser mahazatra sy be mpampiasa indrindra toy ny IE7 sy Firefox aza dia efa afaka mamaky RSS tsara. Fa na dia izany aza, dia tsy mbola very ireo logiciel izay natao hikirakira fil RSS hoatran'ireto voatanisa eto ambany reto.

Newsreaders/Usenet

  • Active Web Reader 2.42
     Active Web Reader is a FREE web feed reader that supports RSS 0.
  • Alnera FeedBuster RSS Reader
     Read, manage and archive your rss, rdf and atom feeds comfortably and easily.
  • Alnera FeedBuster RSS Reader 1.0.15
     Stay always informed.
  • Awasu 2.0
     If you want a tool for monitoring information from any source, something that will let you intelligently manage the information flow, that offers powerful features not available in any other feed reader, then Awasu is your only choice.
  • BlogExpress 1.56.2
     BlogExpress is a full-featured .
  • CoffeeCup RSS News Flash
     Add your own news to your Website or news from Yahoo, CNN, and CNET using Flash.
  • cRSSReader Version 2.0
     cRSSReader is a Windows 98/ME/2000/XP desktop application that aggregates your favorite RSS feeds into one easy to use interface.
  • DWnews 1.0
     Windows based application to aggregate and display news headlines from Internet news feeds.
  • Express NewsPictures
     Express NewsPictures is a powerful newsreader specifically designed for downloading and viewing pictures and other binaries (audio, video and more) from newsgroups.
  • Feed Scout 2.30a
     Feed Scout enables you to view RSS/ATOM/RDF feeds from different sites in Internet Explorer directly.
  • FeedMon 1.1
     FeedMon is a free feed monitor and reader.
  • FeedThing
     FeedThing is a syndicated news reader which makes the job of tracking your favourite websites a joy.
  • FeedTray 2
     FeedTray is a tiny news feed aggregator with a difference - it doesnt have a main window to clutter up your precious screen space with!.
  • Forte Free Agent
     Agent 1.
  • GroupsAloud
     GroupsAloud, the worlds first talking Usenet News Reader, brings an unlimited amount of great information and conversation to you without the hassle of reading or even being tied to your computer.
  • Halime 1.0rc2b
     Halime is a new, revolutionary news reader for Mac OS X only.
  • Headline Viewer 0.9.9
     Headline Viewer is a Windows application that lets you see news headlines from a configurable list of Headline Providers (news sources and weblogs).
  • HTML Primer
     The HTML Primer has been designed to aid you in learning how to create HTML pages from scratch and to show you the basics of web design.
  • IntraVnews 1.12
     intraVnews is a state of the art news aggregator that turns Microsoft Outlook into a news reader.
  • Koala HTML
     Create Web Pages Easily! Need a quick and easy way to create web pages? Look no further than Koala HTML.
  • Lektora 1.0f
     Lektoras feed reader integrates seamlessly with Firefox 1.
  • Liferea
     Liferea is an aggregator for online news feeds.
  • MyFeedReader
     MyFeedReader is a powerful yet lightweight newsfeed aggregator that supports all RSS and ATOM formats.
  • MyNewsToGo 1.0.52.15
     MyNewsToGo is about to revolutionize how you receive every day news.
  • NetNewsWire Lite
     NetNewsWire is an easy-to-use RSS Web news reader for Mac OS X.
  • News File Grabber
     A specialized newsreader which lets you easily download all kinds of binary files from the newsgroups on the USENET.
  • News Interceptor 3
     News Interceptor allows you to keep up-to-date with all news on the Web.
  • News Rover
     News Rover is a very powerful tool and can easily and quickly build up a rather large collection of pictures and movies.
  • News Rover 11
     News Rover is a Usenet newsreader that features a built-in search engine for finding files in any Usenet newsgroup.
  • NewsAloud
     NewsAloud personal news agent from NextUp.
  • Newsgroup Commander
     Newsgroup Commander is the fastest way to find any information youre looking for in news group archives.
  • Newsgroup Commander Pro
     Newsgroup Commander Pro is a news reader program which simplifies complex searches in Usenet archives.
  • newsparrotv4
     NewsParrot.
  • Newsplorer 1.1
     Get a flavour of what Newsplorer 1.
  • NewsShark
     Meet NewsShark, designed from the ground up for getting LARGE files like MP3, RAR, and ZIP from usenet.
  • NewzCrawler
     NewzCrawler is a rss/atom reader, news aggregator, browser and blog client for Windows which provides access to news content from various sources.
  • NewzCrawler 1.8
     NewzCrawler is a rss/atom reader, news aggregator, browser and blog client for Windows which provides access to news content from various sources.
  • Noworyta News Reader 2.9
     Noworyta News Reader is a free Usenet news reader and e-mail client for Windows.
  • Nutshell 1.1
     Nutshell is an application designed to retrieve web content via the RSS format.
  • Omea Reader 2.0
     Free and easy to use RSS reader, NNTP news reader, and web bookmark manager.
  • Pluck 2.0 beta
     RSS offers an easy way for you to be alerted when new content appears on your favorite websites and blogs.
  • RSS Bandit
     RSS Bandit is an RSS/Atom aggregator (also known as an RSS Reader) for your desktop written with the .
  • RSS Feed Maker
     RSS Feed Maker is a windows program that allows you to create rss feed files and upload them to your server.
  • RSS Menu
     RSS Menu is a very simple application that allows you to read any RSS or Atom feeds which can be found all over the internet.
  • RSS Xpress 2.0.1
     RSS Xpress is a freeware (which will remain free!) created by Bull allowing to read RSS feeds versions 0.
  • RssReader 1.0.88
     RssReader is a program to read RSS and Atom news feeds.
  • SharpReader 0.9.6
     Advanced threading support allowing you to view connected items together in a threaded fashion.
  • Site Builder
     Site Builder is an easy to use but powerful HTML editor, it can be used for beginners as well as for advanced users.
  • Unison
     And Unison? Its the second coming of Usenet: a fun, powerful, and Mac-like newsreader.
  • Unison 1.6
     Put simply, Usenet is the Internets oldest message board.
  • Webford HTML Editor
     Webford is a powerful yet user-friendly software package that makes it easy for anybody to create and edit pages for the World Wide Web.
  • YeahReader
     YeahReader is a free program for reading news feeds in RSS, RDF and Atom formats, and podcasts.

Wednesday, March 21, 2007

Monter et configurer un PC nouvelle génération - Mozilla Firefox

Monter et configurer un PC nouvelle génération
Monter et configurer un PC nouvelle génération
Ordinateur personnel
Configuration de référence Ultra
Envie de jouer au Docteur Frankenstein pour donner vie à votre propre PC ? À moins que vous ne préfériez pratiquer une opération à c?ur ouvert pour mettre à jour celui que vous possédez déjà, mais qui semble à bout de souffle ? Oui, vous aussi vous avez le droit de vous amuser !

Nous allons donc vous proposer ici un guide complet pour vous aider à mettre sur pied votre « bête high-tech » de nouvelle génération avec explications, photos et vidéos à l'appui !

Après avoir trouvé le financement nécessaire et sélectionné avec soins vos composants (pour cela, les configurations de référence et le guide d'achat de Noël 2006 peuvent vous simplifier la tâche), saisissez votre tournevis d'une main ferme et décidée, fixez votre écran / vos notes... C'est parti !

Petites recommandations avant de commencer
Avant de mettre les mains dans le « cambouis » à proprement parler (rassurez-vous, vous ne devriez pas trop vous salir ni trop vous écorcher), voici quelques conseils pour que le montage se déroule dans les meilleures conditions qui soient.

Montage PC - Tourne vis
Tout d'abord, placez votre machine au sol ou en hauteur. Évitez à tout prix la moquette ou autre revêtement pouvant générer de l'électricité statique, les composants informatiques n'appréciant guère. Le mieux est de se placer sur une grande table bien stable. Préparez vos outils (tournevis principalement), instructions (article, manuels d'instructions) et composants nécessaires.

(Re)lisez attentivement nos instructions et visionnez (plusieurs fois si nécessaire) nos vidéos. Ne vous énervez pas, ne soyez pas trop brusque, ne buvez pas et ne mangez pas au-dessus de l'ordinateur pendant le montage et n'oubliez pas de respirer. En cas de gros doute, n'hésitez pas à interroger vos proches ou alors les Clubicien(ne)s sur le forum !


Page précédente Page précédente
Pages 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11
Page suivante Page suivante