php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #46706 Integrating XMLReader and XMLWriter into eachother
Submitted: 2008-11-28 09:35 UTC Modified: 2021-04-01 12:40 UTC
Votes:4
Avg. Score:4.2 ± 1.3
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:3 (75.0%)
From: email at robertdewilde dot nl Assigned: cmb (profile)
Status: Wont fix Package: XML Reader
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: email at robertdewilde dot nl
New email:
PHP Version: OS:

 

 [2008-11-28 09:35 UTC] email at robertdewilde dot nl
Description:
------------
I'm using XML a lot for my webresources. Now DOM is one big pain in the ass, because of it's lacking performances and just taking away all the resources when it even only need to search one element.

Therefore I'm using XMLReader and XMLWriter, whose are better performing, and more SAX. But for XML transformations, those are difficult to use. Setting up a whole new XML file works fine using XMLWriter, and reading one is great in XMLReader. Now I thought that maybe those to could be integrated into eachother, using one pointer, to read and write. Additional great feature whould be getting the byte offset in the file (for reference) and being able to set the pointer there. So you won't save whole (DOM)Objects, but you ARE able to reference to the element. I'd really appreciate it!

Second, something I can't really judge from a technical point of view, but I think it's bad that XSL extension was removed. Now the only alternative I know of, is loading all data, both XML and XSLT, into DOMDocument(s) (resources!) and the using those to put into the XSLTProcessor. I mean, output is nice, but can't we just put two strings or to file(references) in there? I think DOM is really taking away a lot there. IMO the knowledge and programming is there, but there are a few critical changes to be made, making it interesting for serious developers. Sure, the DOM is great for people who wants there in-/output right here, right now. But, as you think of SOA, SAAB and webservices, performance on managing XML (WSDL, SOAP, XMLRPC) will be (cost)critical being a big difference in efficience.

I hope I've been able to help PHP evolving. It's not that I'm one big business man, having all the experience needed to make all choice above, but just my opinion as being a little lonely developer ;) Hope you can appreciate it! :) KUTGW

Reproduce code:
---------------
None.

Expected result:
----------------
Better performance.

Actual result:
--------------
Less simplicity.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-23 21:25 UTC] jani@php.net
-Package: Feature/Change Request +Package: XML Reader
 [2021-04-01 12:40 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-04-01 12:40 UTC] cmb@php.net
> Now I thought that maybe those to could be integrated into
> eachother, using one pointer, to read and write.

I don't think this is technically feasible.  XMLReader is
implemented on top of xmlreader[1], while XMLWriter is implemented
on top of xmlwriter[2], and it doesn't look like they're supposed
to be used in combination.

> Additional great feature whould be getting the byte offset in
> the file (for reference) and being able to set the pointer there.

See request #75641 regarding the former.  The latter is not
supported by xmlreader at all.

Anyhow, it seems there is not much interest in this feature, and
given the technical issues, I'm going to close this ticket.  If
anybody still feels strongly that XMLReader and XMLWriter should
be integrated, please pursue the RFC process[3].

[1] <http://xmlsoft.org/html/libxml-xmlreader.html>
[2] <http://www.xmlsoft.org/html/libxml-xmlwriter.html>
[3] <https://wiki.php.net/rfc/howto>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 05:01:28 2024 UTC