libxml suggestion

BlitzMax Forums/Brucey's Modules/libxml suggestion

Czar Flavius(Posted 2011) [#1]
The getChildren:TList() method should, if there are no children, return an empty TList rather than Null. It would simplify some code, as if an xml document is missing some nodes it won't crash my program :)


slenkar(Posted 2011) [#2]
cant you put "if getchildren<>null" ?

or

local listy:Tlist=getchildren

if listy<>null
dostuff()
endif

Last edited 2011


Czar Flavius(Posted 2011) [#3]
I can put I want to do this:

For Local o_node:TxmlNode = EachIn root_node.getChildren()


Without needing to check if the list is null all the time.

The function returns a list of children. If there are no children, it should return an empty list. A list of zero children is different to no list.


Hummelpups(Posted 2011) [#4]
that would be really nice :)