José, Sorry by delay, I cannot see your messages in yahoo mail.
My suggestion is: *-----------------------------------------------------* METHOD SetAttribute( xAttrib, xValue ) CLASS TXmlNode Local xOldValue := ::GetAttribute( xAttrib ) if xValue = NIL xValue := "" endif if ! empty( xAttrib ) if HB_isString( xAttrib ) // attribute name (key name) ::aAttributes[ xAttrib ] := xValue elseif HB_isNumeric( xAttrib ) // attribute position (key ordinal position) if Len( ::aAttributes ) >= xAttrib HSetValueAt( ::aAttributes, xAttrib, xValue ) endif endif endif RETURN xOldValue *-----------------------------------------------------* regards, Eduardo > From: "Jose F. Gimenez" <jfgime...@wanadoo.es> > Sent: Monday, June 22, 2009 5:17 AM > To: "Eduardo Fernandes" <modals...@yahoo.com.br>; > "xHarbour-Developers List" > <xharbour-developers@lists.sourceforge.net> > Subject: Re: [xHarbour-developers] Big problem with > TXML():SetAttribute() > > > Eduardo, > > > >> in c) I think return the previous value is more > useful. > >> in d) I think we can replace ! empty( xvalue) to ! > hb_isnil(xvalue). > > > > I've changed it to allow a) and restored all behaviour > of b) c) and d). > > ITOH, now it's not checking if xValue is nil. If you > want, you may add it. > > > > > > Regards, > > > > Jose F. Gimenez > > > > > > Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com ------------------------------------------------------------------------------ _______________________________________________ xHarbour-developers mailing list xHarbour-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xharbour-developers