Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27403

VS 2010 [RESOLVED] XML Usage

$
0
0
Hi Guys

Im having a bit of a problem with XML usage. I have a V.simple xml file

Code:

<?xml version="1.0"?>
<header>
        <fversion>1</fversion>
        <hattags>^DueType,^VehicleReg,^CompanyName,^CustomerName,^NextDueDate</hattags>
</header>

this text sits on top of a text email template to indicate what the version of the file is And what ^tags the template contains

I would like to be able to tell quickly what version of the file and in another area of the program tell what the ^tags are from the XML this is what i have so far

Code:

        Get_FileVersion = 0
        Dim nodes As XmlNodeList
        nodes = Xml.SelectNodes("/header")
        For Each node As XmlNode In nodes
            Get_FileVersion = node("fversion").Value
        Next

I would assume that is the same code for getting the hattags as it is getting the version

Obviously im doing it wrong but every thing that i have found on the internet shows how to do it with big XML files with multiple nodes. this is first time i have tried to work with xml and getting rather lost

Hope someone can help?

Ian

Viewing all articles
Browse latest Browse all 27403

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>