php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29798 SimpleXML xpath function can't hable SCORM manifest xml files
Submitted: 2004-08-23 15:26 UTC Modified: 2004-08-23 15:37 UTC
From: timo at hhesse dot de Assigned:
Status: Closed Package: SimpleXML related
PHP Version: 5.0.1 OS: Windows 2000
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: timo at hhesse dot de
New email:
PHP Version: OS:

 

 [2004-08-23 15:26 UTC] timo at hhesse dot de
Description:
------------
I made several tests, but it seems like simpleXML->xpath() can't get along with a well formed SCORM imsmanifest.xml file. I can't access the document by xpath queries. result is always array(0). after removing all the parameters of the root <manifest> element, it works.
Sample SCORM compatible xml files can be found here: http://www.adlnet.org/index.cfm?fuseaction=DownFile&libid=641&bc=false
(i used the latest snapshots)

A typical root element of a manifest file looks like this:

<manifest identifier="photo-MANIFEST-remediation" version="1.3"
    xmlns="http://www.imsglobal.org/xsd/imscp_v1p1"
    xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_v1p3"
    xmlns:adlseq="http://www.adlnet.org/xsd/adlseq_v1p3"
    xmlns:imsss="http://www.imsglobal.org/xsd/imsss"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1 imscp_v1p1.xsd
                        http://www.adlnet.org/xsd/adlcp_v1p3 adlcp_v1p3.xsd
                        http://www.adlnet.org/xsd/adlseq_v1p3 adlseq_v1p3.xsd
                        http://www.imsglobal.org/xsd/imsss imsss_v1p0.xsd">




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-23 15:37 UTC] chregu@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

you have a default namespace there, therefore normal xpath queries won't work.

you have to use registerXPathNamespace, which only will be available in PHP 5.1

see http://blog.bitflux.ch/p1746.html for more information.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC