Re: Am I a doofus?
Brought to you by:
bs_php,
nigelswinson
From: Thomas P. N. <as...@mi...> - 2002-08-07 07:39:59
|
Hi again, first off I want to thank you Nigel for the tremendous effort you put into this and I want you to know that it's greatly appreciated. Keep up the good work. Just to comment on Daniels problems: > XPath error in XPath.class.php:1586 In importFromString(): XML error > in given string on line 1 column 0. Reason:syntax error I get the same sort of error - that is varying 'XPath.class.php:####' errors followed by the 'line 1 column 0' hint. One further problem is in the code below. I know it's a bit lengthy - I hope you won't mind it. - Begin code ----- $myindex = new xpath(); $myindex->setSkipWhiteSpaces($onOff=TRUE); $myindex->setXmlOption('XML_OPTION_TARGET_ENCODING', 'UTF-8'); $myindex->importFromString("<searchindex/>"); $searchindex = $myindex->evaluate("searchindex"); foreach ($resultarray as $page => $pagename) { $xmlpage = $myindex->appendChild("searchindex","<$page/>"); foreach ($pagename as $itemkey => $itemvalue) { $myitem = $myindex->appendChild($xmlpage,"<item/>"); } } $myindex->exportToFile("../search_index.xml"); - End code ----- The problem is, that the child in the line '$myitem = $myindex->appendChild($xmlpage,"<item/>");' doesn't seem to work. Now, if placed outside the foreach loop it does work, which strikes me as odd. I've tried with manual as well as automatic reindexing, which doesn't seem to have an influence. I am presented with a blank screen when running the script - no error messages. Thank you very much for your time. Sincerely, Thomas |