idw - continued
Brought to you by:
bs_php,
nigelswinson
From: Peter R. <ph...@pe...> - 2001-12-06 14:15:51
|
can't say I've been inundated with solutions to my previous posting :-(, but it's actually easy to fix w/o recompiling PHP as Dan suggests. Just escape the underscores in eregs, i.e. on lines 1990 and 2778. Having fixed that, I now have a different problem. I have an xml file with large numbers of child (+ grandchild ...) nodes which may or may not be present. My old phpxml script did an evaluate for the top level and then get_Contents for any children it needed; if a child didn't exist, phpxml simply set the variable to null. phpxpath, however, seems to throw an error and refuse to continue if you try and getData or getDataParts for a child or attribute that doesn't exist. If I have to do a match/evaluate for each of these nodes before getData, not only is that a lot of extra work but I'll probably have to rewrite the logic. Can phpxpath be changed to be like phpxml and simply set the variable to null if getData doesn't find the node? |