Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: getting overwhelmed...reading and testing XML


Message #1 by Cindy.Somerville@h... on Tue, 5 Nov 2002 15:40:59
I'm getting overwhelmed!

I?m a computer programming student in a co-op placement. I have been given 
a task to do involving an XML file and dynamically displaying selected 
records to a web page. 

I?m starting to feel overwhelmed with the options for completing the task 
assigned to me. I really need some advice on which direction to take this. 
Could someone please point me in the right direction!

My task is to read an XML file. 
Test the date field to ensure that it is >= testDate.
Then I have to test the language field for English or French.
Then I have to compare the date field with the date field in the previous 
row?this will determine the formatting of the record. 

I completed all this successfully when my data was in an access 
database...but someone decided that I needed to use XML instead. So, I'm 
starting over!!!

I?ve tried XMLReader, dataSets, dataTables, nested if statements, 
table.select method. Each time I hit a wall. Should I be trying XMLReader 
again? Should I continue with dataTables? 

If there is somebody out there that knows this stuff?.could you please 
give me some advice as to which direction I should be going in to complete 
this task. 

Getting desperate and need help!!

Thank you
Message #2 by "Paul Riley" <rilez@t...> on Tue, 5 Nov 2002 15:56:07 -0000
The following will parse the file

	dim objXMLdoc as new xmldatadocument(),raa,raa2 as xmlnode
	objxmldoc.load("c:\inetpub\wwwroot\test page.xml")
	for each raa in objxmldoc.childnodes
		response.write(raa.name & "<br>")
		if raa.name="page" then
			for each raa2 in raa.childnodes
				response.write(raa2.name)
			next
		end if
	next

it's a very very basic but you should be able to iterate through until
you find the nodes you want and then so the tests. How were you doing
the same thing in Access as there may be something closer to the way you
used to be working. 

-----Original Message-----
From: Cindy.Somerville@h...
[mailto:Cindy.Somerville@h...] 
Sent: 05 November 2002 15:41
To: aspx_beginners
Subject: [aspx_beginners] getting overwhelmed...reading and testing XML

I'm getting overwhelmed!

I'm a computer programming student in a co-op placement. I have been
given 
a task to do involving an XML file and dynamically displaying selected 
records to a web page. 

I'm starting to feel overwhelmed with the options for completing the
task 
assigned to me. I really need some advice on which direction to take
this. 
Could someone please point me in the right direction!

My task is to read an XML file. 
Test the date field to ensure that it is >= testDate.
Then I have to test the language field for English or French.
Then I have to compare the date field with the date field in the
previous 
row.this will determine the formatting of the record. 

I completed all this successfully when my data was in an access 
database...but someone decided that I needed to use XML instead. So, I'm

starting over!!!

I've tried XMLReader, dataSets, dataTables, nested if statements, 
table.select method. Each time I hit a wall. Should I be trying
XMLReader 
again? Should I continue with dataTables? 

If there is somebody out there that knows this stuff..could you please 
give me some advice as to which direction I should be going in to
complete 
this task. 

Getting desperate and need help!!

Thank you
---
Beginning ASP.NET Databases using VB.NET
http://www.wrox.com/ACON11.asp?ISBN=1861006195

Beginning ASP.NET Databases using C#
http://www.wrox.com/ACON11.asp?ISBN=1861007418

These books look at how we can create data-centric ASP.NET 
applications. Requiring some basic knowledge of ASP.NET, 
Access and SQL the authors guide you through the process 
of connecting and consuming information in a variety of 
ways. They are packed full of excellent illustrative code 
examples, demonstrating important fundamental principles.


  Return to Index