Patch for xmlnode ...

Mauro Sérgio Ferreira Brasil mauro.brasil at tqi.com.br
Fri Aug 17 15:23:58 EDT 2007


Yeah!
In fact, the "xmlnode_free" method does exactly what I need. The name 
ain't gave me that idea, but it does the job.

Anyway, I found just one problem.
When the element freed is pointed by "parent->lastchild", this value is 
not updated, what leads to a problem when adding new nodes.

I'll post a patch, as soon as possible.

Do you think a macro or method called "xmlnode_remove_child" that 
receives the parent and child nodes, but don't use the first parameter 
and just pass the second to "xmlnode_free" would be an acceptable update 
too?
Just to have a method with a more intuitive name?
Please give me an update about this sugestion, so it can be part of the 
patch or not, ok?

Thank's and best regards!!!



Gary Kramlich wrote:
> Mauro Sérgio Ferreira Brasil wrote:
>> Hello there!!!
>>
>> I was needing a method to remove child nodes from a parent one.
>> Looking into the "xmlnode.h" header file, I couldn't found one that 
>> could be used for such purpose.
>
> um xmlnode_free should clean up the parent...  if it doesn't it should 
> be made to do so.  Unless you're just trying to delete all of the 
> children and keep the parent around.
>
>> Thank's and best regards!!!!
>>
>> -- 
>> __At.,                                                                                                                             
>
>

-- 
__At.,                                                                                                                             
   _
 
*Tecnologia e Qualidade em Informática Ltda*
Mauro Sérgio Ferreira Brasil
Analista de Sistemas
+ mauro.brasil at tqi.com.br <mailto:@tqi.com.br>
: www.tqi.com.br <http://www.tqi.com.br>
( + 55 (34)3291-1700
( + 55 (34)9971-2572

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20070817/51a311ce/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMMI.jpg
Type: image/jpeg
Size: 9241 bytes
Desc: not available
URL: <http://pidgin.im/pipermail/devel/attachments/20070817/51a311ce/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TQI.gif
Type: image/gif
Size: 653 bytes
Desc: not available
URL: <http://pidgin.im/pipermail/devel/attachments/20070817/51a311ce/attachment-0002.gif>


More information about the Devel mailing list