The XML parsing routine embedded in the "emfield_request_xml" function in emfield.module is not successfully parsing some xml files (or at least not properly).
To see what I mean here is a link to an XML file for an video on archive.org...
http://ia331406.us.archive.org/1/items/2006MacNorwalkPerformance/2006Mac...
Now attached (samplereturn) is a print_r of the result coming back from emfield_request_xml.
In case that is hard to decipher I'm also attaching a part of a krumo screenshot courtesy of devel module...
Anyway, hopefully it is clear what is happening? The source xml has a single top level element "" with no attributes and only an array of "" elements embedded. But the way emfield_request_xml is returning the array, it has flattened it so there is a "" array item, but the "" array items are not sub elements of this array, but rather same level. Worse it has put the first file in the array under the "" array element, but only the first property inside of it, then it _repeats_ that element again.
Anyway, I'll try to debug the xml parsing code, but perhaps someone familiar with that code can see the problem?
| Comment | File | Size | Author |
|---|---|---|---|
| krumoscreen.jpg | 81.48 KB | winston | |
| samplereturn.txt | 17.12 KB | winston |
Comments
Comment #1
winston commentedDarn, my post ate some tags! Here it is again (see original for attachments).
*****
The XML parsing routine embedded in the "emfield_request_xml" function in emfield.module is not successfully parsing some xml files (or at least not properly).
To see what I mean here is a link to an XML file for an video on archive.org...
http://ia331406.us.archive.org/1/items/2006MacNorwalkPerformance/2006Mac...
Now attached (samplereturn) is a print_r of the result coming back from emfield_request_xml.
In case that is hard to decipher I'm also attaching a part of a krumo screenshot courtesy of devel module...
Anyway, hopefully it is clear what is happening? The source xml has a single top level element
"<files>"with no attributes and only an array of"<file>"elements embedded. But the way emfield_request_xml is returning the array, it has flattened it so there is a"<files>"array item, but the"<file>"array items are not sub elements of this array, but rather same level. Worse it has put the first file in the array under the"<files>"array element, but only the first property inside of it, then it _repeats_ that element again.Anyway, I'll try to debug the xml parsing code, but perhaps someone familiar with that code can see the problem?
Comment #2
aaron commentedThe module now provides emfield_retrieve_xml($url).