[phpXML] two things in _export
Brought to you by:
bs_php,
nigelswinson
From: <big...@ya...> - 2001-10-03 08:38:10
|
First an easy fix...in the _export() function, $hasChildren is spelling wrong run this in vim %s/$hasChilderen/$hasChildren/gc and that should take care of it... Next...mixed content...now, most of you are not going to like the solution I have, but here goes anyway... If the context is mixed, like if the are <br/> in text or something like that, the indenting is done, but each time you run the file through and save it, the linefeeds keep growing and you end up with this huge gap int the xml file. Now, the solution would be to add a paramter to export called $useIndent = TRUE and when you called _export recursively, just call it with _export(...,!$isMixed) and then when you go to add the \n only do it if $useIndent is true...This fixes the <br/> <hr/> problem, but if you have more complex stuff, it gets hairy, but in reality, mixed content shouldn't be used much... Tell me what you think! Dan -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |