xboxscene.org forums

Pages: 1 2 [3]

Author Topic: The Official Version "O" Brainstormer  (Read 1330 times)

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
The Official Version "O" Brainstormer
« Reply #30 on: March 09, 2004, 07:36:00 AM »

QUOTE (Kthulu @ Mar 9 2004, 09:51 AM)
i completely understand why prefs.xml is the better choice after you explained.  the important thing to me was that settings and config info be consolidated and it sounds like you were planning on that already.

it still seems to me that <autodir> would be better as a sibling of <item> (as a node instead of an element) but i guess that would take alot of work.

EDIT:  or maybe i did my <autodir> wrong in my menu file???

Well, the XML parser I have heavily modified and incorporated considers any tags that have other tags in them to be "nodes" - while those simply having values are "elements". I designed the API I use to rather loosely handle values whether they are elements or attributes, and even handle specific elements of node ("value") as values of a node identifier.

In short, I designed it to be very forgiving of human-written XML input.

To this end, Items almost always nodes, though it might be possible to put a monkey wrench in things and define all of the values as attributes. AutoDir, on the other hand, is very easy to define as an element, since it has few "subvalues"

:::shrug::: if I had to do it all over again, I would not have made a distinction between nodes and elements at all. My next project will probably utilize a parser and data access API I write from scratch.

Unfortunately, that terrible word "legacy" pops up to bite me in the ass now. Making significant changes to make AutoDir work as you say, would likely break a great deal more things.

Trust me, though... were I writing this from scratch, I would do things differently (probably more along the lines of your idea).
Logged
Pages: 1 2 [3]