← Back to team overview

kicad-developers team mailing list archive

wxWidgets XML support

 

Never looked at it before.  Their XML library is *very* good for doing tree type XML
work, not SAX processing.


Just look at this one function, and you know somebody good wrote it:


  bool wxXmlNode::GetAttribute( const wxString& attrName, wxString* value ) const


1) it returns whether an attribute was found, true or false.

2) it uses wxString* rather than wxString& to receive the fetched value.  This shows
up at the call site as

if( node->GetAttribute( name, &value ) )
{
}


I like that, it tells me to expect value to be modified at the call site because I
have to prefix it with &.

This library is as simple as possible, but not simpler.  I give it an excellent rating.

Even has a virtual wxXmlNode::InsertChildAfter().  class wxXmlNode is excellent
excellent stuff for doing tree type XML work, not SAX processing.


Dick