XML Question
Posted: Tue Apr 22, 2008 1:27 pm
I've not gone too much into XML, no particular reason just never got around to it I suppose. I've mostly just used it to quickly store and load things but have never gone much further.
My question is, what are the "rules" to XML? For instance I've never clearly understood when I should use attributes or not. I know there are general rules when formatting it, but I can't seem to find a tutorial that simply lists them (without going into nonsense I really don't need to know).
I've started work on a configuration system for one of my scripts and I've decided to use XML to format the configuration data. Here is the sample I created and am working with:
Is there anything "wrong" with this? I.E should id be a node and not an attribute?
Also, if anyone can point me to some good XML tutorials that only discuss proper formatting (with examples) that would be helpful. I really prefer to do this right the first time
Thanks.
~ Josh
My question is, what are the "rules" to XML? For instance I've never clearly understood when I should use attributes or not. I know there are general rules when formatting it, but I can't seem to find a tutorial that simply lists them (without going into nonsense I really don't need to know).
I've started work on a configuration system for one of my scripts and I've decided to use XML to format the configuration data. Here is the sample I created and am working with:
Code: Select all
<config>
<admin username="test" password="45093">
<members>
<member id="1" name="2">
<ip>343.4.34.33</ip>
<ip>53.56.235.63</ip>
</member>
</members>
</config>Also, if anyone can point me to some good XML tutorials that only discuss proper formatting (with examples) that would be helpful. I really prefer to do this right the first time
Thanks.
~ Josh