Is there any known issue with PHP/5.2.5 and phpQuery?
I've developed a site where I use phpQuery to parse XML files and it
works fine in my computer. However, when I run it in another box
phpQuery is unable to fetch data. Calls to the attr() method return
empty strings. A simplified fragment:
<s:Schema id='RowsetSchema'>
<s:ElementType name='row' content='eltOnly'>
<s:AttributeType name='ComparteElementoComun_ID' rs:number='1'
rs:maydefer='true' rs:writeunknown='true'>
<s:datatype dt:type='int' dt:maxLength='4' rs:precision='10'
rs:fixedlength='true'/>
</s:AttributeType>
<s:AttributeType name='ComparteElementoComun' rs:number='2'
rs:nullable='true' rs:maydefer='true' rs:writeunknown='true'>
<s:datatype dt:type='string' dt:maxLength='100'/>
</s:AttributeType>
<s:extends type='rs:rowbase'/>
</s:ElementType>
</s:Schema>
foreach($this->xml['schema elementtype attributetype'] as $campo){
if( count(pq($campo)->find('datatype'))==1 ){
$tipo = pq($campo)->find('datatype')->get(0);
echo pq($tipo)->attr('dt:type'); // Should print "string" but prints
""
}
}
Both code and data are exactly the same. Both servers run PHP as
Apache 2.2 module in a Windows box. The only significant difference I
could find is that my computer runs PHP/5.2.6 and the computer where
it fails runs PHP/
5.2.5.