ID:               49051
 Comment by:       afpral dot com at gmail dot com
 Reported By:      major at minet dot sk
 Status:           No Feedback
 Bug Type:         XML Writer
 Operating System: Vista 32bit
 PHP Version:      5.3.0
 New Comment:

Warning: XMLWriter::openUri() [xmlwriter.openuri]: Unable to resolve
file path
With DIRECTORY_SEPARATOR uri to
not the same issue with only file name.
Parse filepath problem


Previous Comments:
------------------------------------------------------------------------

[2009-08-01 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2009-07-24 17:12:20] j...@php.net

Since when is 'data/file.xml' a valid URI? Try with proper URI instead.

------------------------------------------------------------------------

[2009-07-24 16:22:35] major at minet dot sk

Description:
------------
When I try to write content of xml file using XMLWriter, it works fine
_only_ if xml file is in the same directory as php script. When path
contains slash or backslash, it is unable to open file.
My code works on 5.2.9 but fails when running on 5.3.0 (I use
WampServer).

Reproduce code:
---------------
<?php
$x = new XMLWriter();
$x->openURI('data/file.xml');
$x->startDocument('1.0', 'UTF-8');
$x->writeElement('root');
$x->endDocument();
print '<plaintext>'.file_get_contents('data/file.xml');
?>

Expected result:
----------------
<?xml version="1.0" encoding="UTF-8"?> <root/> 

Actual result:
--------------
Warning: XMLWriter::openUri() [xmlwriter.openuri]: Unable to resolve
file path in C:\localhost\www\xml.php on line 3

Warning: XMLWriter::startDocument() [xmlwriter.startdocument]: Invalid
or unitialized XMLWriter object in C:\localhost\www\xml.php on line 4

Warning: XMLWriter::writeElement() [xmlwriter.writeelement]: Invalid or
unitialized XMLWriter object in C:\localhost\www\xml.php on line 5

Warning: XMLWriter::endDocument() [xmlwriter.enddocument]: Invalid or
unitialized XMLWriter object in C:\localhost\www\xml.php on line 6


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49051&edit=1

Reply via email to