Req #46706 [Opn->Wfx]: Integrating XMLReader and XMLWriter into eachother

From: Date: Thu, 01 Apr 2021 12:40:36 +0000
Subject: Req #46706 [Opn->Wfx]: Integrating XMLReader and XMLWriter into eachother
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-233121@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=46706&edit=1 ID: 46706 Updated by: cmb@php.net Reported by: email at robertdewilde dot nl Summary: Integrating XMLReader and XMLWriter into eachother -Status: Open +Status: Wont fix Type: Feature/Change Request Package: XML Reader Operating System: Linux PHP Version: 5.2.6 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: > 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> Previous Comments: ------------------------------------------------------------------------ [2008-11-28 09:35:17] 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=46706&edit=1

« previous php.bugs (#233121) next »