Re: XML_Tree->get()

From: Date: Wed, 02 Oct 2002 11:08:28 +0000
Subject: Re: XML_Tree->get()
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-9799@lists.php.net to get a copy of this message
Please go ahead. Tomas V.V.Cox PS.- Just a recommendation: always try to CC the author plus the pear-dev list. Tony Bibbs wrote: > > Hello, > > My name is Tony Bibbs and I've been working with XML_Tree here most of the > day. We have an XML-based authentication and authorization system we use > across our enterprise. It is a Java based service and we already have VB > and Java clients. I'm currently developing the PHP client. > > My problem is this that until web serivces becomes a bit more mature, we > are implementing the service via HTTP form posts with a single variable > holding the XML request and response. Because of this, I can't use > XML_Tree::dump as that dumps the tree immediately and I need to do further > string manipulation. So, instead, I tried to use XML_Tree::get and that > works accept for the fact is formats the string (e.g. inserts tabs, spaces > and newline characters). This characters cause Xerces, the Java XML > parser to throw a bad XML exception. So my question is, can I talk you > guys into including a new method of XML_Tree::get that does no formating? > > i.e. instead of returning this: > <xml version="1.0> > <MyRoot> > <MyChild1></MyChild1> > <MyCHild2></MyChild2> > </MyRoot> > > it would give: > <xml > > versoin="1.0"><MyRoot><MyChild1></MyChild1><MyChild2></MyChild2></MyRoot> > > I'd be willing to write that method for you for inclusion. > > I know you may be saying, then why not just do standard string > manipulation instead. My reponse to that is your addRoot/AddChild methods > save the total number of lines of code and when we do port to web > services, I don't have to change a thing. I guess the ultimate question > is would anybody else find this useful? I am guessing so. > > Thoughts, questions, concerns? > > Thanks for a great XML class, > > --Tony

« previous php.pear.dev (#9799) next »