Whitespace issues.
Brought to you by:
bs_php,
nigelswinson
From: <php...@li...> - 2001-10-22 10:01:15
|
> Hey Nigel, just saw you fixed the & bug, that's > sweet. I wanted to suggest > one other change to the export function that I > forgot to mention... <snip> > I am > attempting to clean up the > export of data when a tag has "mixed" > children...notice how I added the > parameter $useIndent...the point here is if the > node has mixed children, it > turns off the linefeeding and indenting so that > when you read in a file, dump > it, read it in, dump it, etc... you don't end up > with tons of empty lines in > your mixed data....try it out now by putting some > <br/> tags inside of your > text node and you will see what I am talking > about...cruise through this code > to see my idea about adding a "mixed" child > checker...is is pretty basic what > I did and seems to work 100%... I've actually completely re-written the handling of whitespace so that if you import() export() you will get the same whitespace. It also supports <![CDATA[ ]]> and <?handler ?> script blocks. When you call appendChild() it will "guess" the whitespace for you. This should make for a better model, and whitespace shouldn't start "growing" now like it used to. Hopefully this will meet your needs, if not let us know... Nigel =========================== For the most recent version of phpxml, V1.N.X, and an archive of this list visit: http://www.sourceforge.net/projects/phpxmldb |