On Dec 11, 2007 3:52 AM, Dani Castaños <danitao.mailists@xxxxxxxxx> wrote: > If i use your script like this: > > $xml = '<?xml version="1.0"?> > <response> > <ticketID>1197027955_8310</ticketID> > <status>OK</status> > <errCode>200</errCode> > <errMsg></errMsg> > </response>'; > > $obj = new DOMDocument(); > $obj->loadXML( $xml ); > > echo print_r( $obj, true ); > echo $obj->saveXML() . PHP_EOL; > > The first statement writes: > DOMDocument Object > ( > ) > > The second: > <?xml version="1.0"?> > <response> > <ticketID>1197027955_8310</ticketID> > <status>OK</status> > <errCode>200</errCode> > <errMsg/> > </response> > > It's just the xml is not properly stored in loadXML method... but the > string must be inside due to saveXML returns the proper value. that is expected behavior. some of the internal classes dont define any member variables that the php language has access to. obviously they are storing data internally, said variables just arent accessible as member variables of the class thats being defined. you can look at the structure of a class in one line with: Reflection::export(new ReflectionClass('DomDocument')); -nathan