It seems you are right. The returned object is not countable... it is an
object. Although it should theoretically be, because the example in the Zend
Documentation counts the results (the matches) the same way.
Why is it then, that my code doesn't work...? I am loading the xml file the
right
oportell wrote:
$xmlfile = BASE_PATH . '/language/all_languages.tmx';
if (file_exists($xmlfile)) {
$xml = file_get_contents($xmlfile);
$dom = new Zend_Dom_Query();
$dom-setDocumentXml($xml);
$xpath = //t...@xml:lang='en'];
$results = $dom-queryXPath($xpath);
$rows =
-- prodigitalson ant.cunning...@gmail.com wrote
(on Wednesday, 28 October 2009, 01:43 PM -0700):
Well i havent used Zend_Dom either but i assume its using SimpleXml for its
underlying functionality.
Nope -- it uses the DOM extension.
If this is indeed the case im thinking that maybe its the
Hi,
Is there an easy way for doing a search in an XML file?
I have an TMX file with a language list:
?xml version=1.0 ?
tmx version=1.4
header creationtool=hand made
creationtoolversion=1.0.0
datatype=winres
segtype=sentence
Well i havent used Zend_Dom either but i assume its using SimpleXml for its
underlying functionality. If this is indeed the case im thinking that maybe
its the namespace... try removing the xml namespace prefix from your xpath
string. I know simpleXML requires a fully expanded prefix when using