I have not used real basic/xojo in over 6 years, I took a break from programming. To make a long story short, I am having a problem loading xml and parsing the catagories and note. I was able to create the xml text, here is a two record example.
<?xml version="1.0" encoding="UTF-8"?><What_I_Want_Root_Document><What_I_Want_object Text_Item="Diet Root Beer" Cost="0.000000" Cost_To="0.000000" Status="Ongoing Expense"><Categories Category="Food"/><Categories Category="pop"/><Notes Note="No Note"/></What_I_Want_object><What_I_Want_object Text_Item="Coffee Fool Coffee" Cost="0.000000" Cost_To="0.000000" Status="Ongoing Expense"><Categories Category="Food"/><Categories Category="Drink"/><Notes Note="No Note"/></What_I_Want_object></What_I_Want_Root_Document>
my problem is I can not iterate the categories and notes. This is my code for loading, the text_item,status,cost, and cost_to I can iterate out and are ok.
this is my code:
For counter As Integer = 0 To root.ChildCount - 1
// Add Team name or iterate though what_I_want records
teamNode = root.Child(counter)
// What_I_Want_List.AddRow(teamNode.GetAttribute(“Text_Item”))
MessageBox(teamNode.GetAttribute(“Text_Item”))
MessageBox(teamNode.GetAttribute(“Cost”))
MessageBox(teamNode.GetAttribute(“Cost_To”))
MessageBox(teamNode.GetAttribute(“Status”))
var categories_node as xmlnode
categories_node = teamNode.GetAttributeNode(“Categories”)
// // // Add Players
For counter2 As Integer = 0 To categories_node.ChildCount - 1
playerNode = categories_node.Child(counter2)
messagebox(playerNode.GetAttribute(“Category”))
// messagebox((playerNode.GetAttribute(“Category”).ToText)
Next
Next
Any help would be great. Thanks!