PC W7 64 bit Ultimate CS3.
I am just about done with the current XML project. I keep wondering what I have missed or are doing wrong because It is much easier than I thought it would be.
There are a few things that are happening and I hope someone here can help me fix them, if possible.
First, when creating the XML object, the declaration line is skipped, or at least it is skipped when writing the updated object back to a file:
<?xml version="1.0" encoding="utf-8"?>
I did a test with a file with out that line and the program that will use the output doesn't seem to mind it not being there. In fact, when it updates the file it adds it. While that may not matter, I don't like leaving things out of other products files.
Second, while I realize that it may not be strict XML format, some of the 'empty' elements have:
instead of the <Commands></Commands> and the script writes those lines back as:
with out the space before the slash.
I have poked around on the WEB a little but can't find if that is a valid format or not.
I tested the file with that format (no space) and the program doesn't seem to mind. Again, it updated the lines to the way it wanted them - with the space.
Even though the book says all the attributes for XML are true, except for whitespace, they were false. Making all of them true, even the whitespace one, doesn't seem to have any effect on the above two situations.
Thanks for any comments.