473,387 Members | 3,684 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,387 software developers and data experts.

xml parse not working

Hi,

I have the following code. I wish to parse the following:

<assignments>
<assignment>
<position>Sub</position>
<assigned_locations>
<assigned_location>0001</assigned_location>
<assigned_location>0023</assigned_location>
<assigned_location>0044</assigned_location>
</assigned_locations>
<assignment>
<assignments>

the following code doesnt seem to loop thru the many locations of the
assigned_locations node.

Dim AssignmentsList As XmlNodeList
Dim AssignmentOccurrence As XmlNode
Dim LocationList As XmlNodeList
Dim location As XmlNode

For Each Assignment In EmpAssignments
AssignmentsList = Assignment.SelectNodes("assignment")
prm.Num_of_Assignments = 0
For Each AssignmentOccurrence In AssignmentsList
aIdx += 1
prm.Num_of_Assignments = aIdx
prm.Num_of_Locations(aIdx) = 0
prm.Position(aIdx) = GetXMLnodeValue(AssignmentOccurrence,
"position")
LocationList =
AssignmentOccurrence.SelectNodes("assigned_locatio ns")
lIdx = 0
For Each location In LocationList
lIdx += 1
prm.Num_of_Locations(aIdx) = lIdx
prm.Assign_Location(aIdx, lIdx) = GetXMLnodeValue(location,
"assigned_location")
Next
Next
Next

Shouldnt the loop for each location go thru the elements? It doesnt.

thanks,
Will
Jan 23 '06 #1
0 904

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

Similar topics

2
by: Steven | last post by:
I got a "Parse error: parse error in ..." in this line: if(empty($_POST){ ..... But if I fist assign $ssn=$_POST; and then if(empty($ssn){ ... it is working. Any advice? Thanks in advance.
10
by: Stuart Rogers | last post by:
I have just setup my website with a new linux hosting service. I have copied over my scripts and the jpgraph (the stable version) files from my working local lan linux server. The hosting service...
21
by: William Stacey [MVP] | last post by:
Anyone know of some library that will parse files like following: options { directory "/etc"; allow-query { any; }; // This is the default recursion no; listen-on { 192.168.0.225;...
3
by: c0uch | last post by:
the first and third methods are in a usercontrol object. txtValue is a TextBox the float.parse in the if statement on line 3 always works fine. the second float.parse in the third method is...
34
by: priyanka | last post by:
Hi, I was wondering if we could parse or do something in the executable( whose source language was C). How can I use some scripting language like perl/python to find out the information about...
4
by: Peter Proost | last post by:
Hi group, it's been a long time since the last time I've been here but I have a question. I'm working with timespan.parse for calculating a duration, I have to add strings which are in the...
4
mikeinspain
by: mikeinspain | last post by:
Keep getting this error! Parse error: syntax error, unexpected $end in /home/9144/domains/cbweb.co.uk/html/faq_finance.php on line 139 PHP Below.. Script was working 1 minute and copied the...
5
AdrianH
by: AdrianH | last post by:
Assumptions I am assuming that you know or are capable of looking up the functions I am to describe here and have some remedial understanding of C++ programming. FYI Although I have called...
2
by: Lawrence Krubner | last post by:
Imagine a template system that works by getting a file, as a string, and then putting it through eval(), something like this: $formAsString = $controller->command("readFileAndReturnString",...
6
by: =?Utf-8?B?RGF2aWRN?= | last post by:
Hello, I have an XML file generated from a third party application that I would like to parse. Ideally, I plan on having a windows service setup to scan various folders for XML files and parse the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.