473,322 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

VB.Net and XML Example

CG
Hi

I am looking for some sample code taht iterates through an XML document in VB.Net

I have never used XMl and need to get an example so I can start working with it

Thanks
CG.
Jul 21 '05 #1
1 1745
Here's some XML...

<AdjudicationEngineConfiguration>
<PlugIn Assembly="C:\Documents and Settings\amarshall\Desktop\Andrew\Claims
Tool\New Adjudication Engine\Design\Code\Claims Tool Adjudication
Plug-In\bin\Claims Tool Adjudication Plug-In.dll"
Namespace="HarmonyIS.ClaimsTool.AdjudicationEngine PlugIn">
<RuleFactory Class="ClaimRuleFactory"/>
<QuestionFactory Class="ClaimQuestionFactory"/>
</PlugIn>
</AdjudicationEngineConfiguration>

Here's some semi-crappy code that read the previous XML...

Dim AssemblyFileName, PlugInNamespace _
, RuleFactoryClassName, QuestionFactoryClassName _
As String

'Read configuration file for assembly and class information
Dim XMLDoc As Xml.XmlDocument = New Xml.XmlDocument()
XMLDoc.Load("Adjudication Engine Configuration.xml")

'TODO: Add error handling if file does not exist

With XMLDoc.SelectSingleNode("AdjudicationEngineConfigu ration")
With .SelectSingleNode("PlugIn")
AssemblyFileName = .Attributes("Assembly").Value
PlugInNamespace = .Attributes("Namespace").Value
With .SelectSingleNode("RuleFactory")
RuleFactoryClassName = .Attributes("Class").Value
End With
With .SelectSingleNode("QuestionFactory")
QuestionFactoryClassName = .Attributes("Class").Value
End With
End With
End With

Don't forget to reference System.XML.

That should get you started.

Andrew J. Marshall
MCP (Visual Basic)
Fairfax, VA

"CG" <an*******@discussions.microsoft.com> wrote in message
news:43**********************************@microsof t.com...
Hi,

I am looking for some sample code taht iterates through an XML document in VB.Net.
I have never used XMl and need to get an example so I can start working with it.
Thanks,
CG.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
6
by: Ville Vainio | last post by:
Just posting this for the sake of google: Like everyone else, I figured it's time to start using the 'logging' module. I typically want to dump "info" level (and up) log information to...
5
by: relaxedrob | last post by:
Hi All! I ran the following w3c example through my WSDL parser (SOA Editor from Cape Clear): http://www.w3.org/TR/wsdl#_rpcexample It told me that there were a bunch of erros about no...
1
by: Bo Xu | last post by:
Object of Combination By Bo Xu Introduction A combination of n things, taken s at a time, often referred as an s-combination out of n, is a way to select a subset of size s from a given set of...
25
by: Xah Lee | last post by:
Python Doc Problem Example: gzip Xah Lee, 20050831 Today i need to use Python to compress/decompress gzip files. Since i've read the official Python tutorial 8 months ago, have spent 30...
11
by: ajikoe | last post by:
Hello, I used Visual C# Standard Edition. I want to comment my program using xml commentary method, I don't know why if I use value and example tag, it is not working / showed in the html...
6
by: cj | last post by:
Lets just take this example I'm looking at now. I'm looking at the help screen titled .NET Framework Class Library FolderBrowserDialog Class . It gives an example at the bottom that begins with:...
8
by: Scott M. | last post by:
Where will code that is preceded with: /// <example> /// some comments /// </example> actually show up? I can see my <summaryand <remarkscode showing up in the code comment pages and in...
25
by: meltedown | last post by:
This is supposed ot be an example: http://www.ajaxtutorial.net/index.php/2006/11/30/simple-ajax-using-prototype-part-2/ It says : This example is probably the simplest example you will ever...
6
by: Guy Macon | last post by:
While I agree with the sentiment, the oringinal title on this thread ("OT: Specially for , why you should always use example.com for obfuscating domains") is wrong. There are other reserved domain...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.