I’m trying to load this xml document in to a sql database my problem is reading the document
i need to make every skill in to a different row in my db with columns like description,rank,requiredAttributes, requiredSkills, skillBonusCollection my problem is reading the required Skills and skillBonusCollection
so what i want to do is to make each row off skills
Take this and get everything out as different variables
i already made it work with getting stuff like typename, typeid, description,rank out of the dukoment without errors but in having trouble when i need to acces requiredskills, requiredattributes,skillbonusCollection
be aware that required skills might not exist
Below is my currently code where some parts is working but accessing requiredskills, requiredattributes,skillbonusCollection isn’t
simon did wrote:Below is my currently code where some parts is working but accessing requiredskills, requiredattributes,skillbonusCollection isn’t
What problem are you having? Specifically what input, what output, what is the difference? We can't help if you don't TellTheDetails (<- link).
Not sure, but I am guessing the problem you are having is in the commented code, so you removed the most relevant part of the code: so we can't deduce your problem from your code either.
A couple of hints: your variable names are next to useless. It makes it hard to track what data you expect in each element. If you name them appropriate to the expected data it might be easier to read and work with. As it stands, I find it impossible to figure out what line of code is used to get what line of XML, because the element names are generic, you start at some point that doesn't exist in your example XML ("result") and your variables are repetitive, take the name of the XML tag rather than the data it should represent.
You might consider using XPath to select the proper rows/rowsets for the requiredSkills, etc... For example, assume you have a Node pointing to a <row ...> for a particular skill: