2011-04-09, 08:31:23
Slowly getting a grip on handling the XML.
I can load the file (easy), iterate through it (medium), edit elements plus their attributes (easy) and save to file (easy). asXML() was much easier than I thought, I just read up on it on some other tutorial site and it clicked.
While doing this I'm optimising my code writing which slows down progress of course -- I find it hard to resist though. I started off with speaking variables and functions which were "namespaced" (read prefixed), but too long/detailed and I didn't use constants for oft-used stuff like paths to data/plugin folders. I heavily comment my code which is partly for me and partly for others who might have a look-see at some point in the future -- this takes some time as well, but seems well-worth the effort.
Started making a list of system variables I can use for the main feed elements like site name, site url, page date, etc. I set up folder and file checks and catch creation/modification of pages now.
So, things are progressing slowly, but I take tremendous satisfaction from completed and working functions. (yay.) I may have a first snapshot for review sometime next week.
I can load the file (easy), iterate through it (medium), edit elements plus their attributes (easy) and save to file (easy). asXML() was much easier than I thought, I just read up on it on some other tutorial site and it clicked.
While doing this I'm optimising my code writing which slows down progress of course -- I find it hard to resist though. I started off with speaking variables and functions which were "namespaced" (read prefixed), but too long/detailed and I didn't use constants for oft-used stuff like paths to data/plugin folders. I heavily comment my code which is partly for me and partly for others who might have a look-see at some point in the future -- this takes some time as well, but seems well-worth the effort.
Started making a list of system variables I can use for the main feed elements like site name, site url, page date, etc. I set up folder and file checks and catch creation/modification of pages now.
So, things are progressing slowly, but I take tremendous satisfaction from completed and working functions. (yay.) I may have a first snapshot for review sometime next week.