Skip to content
  • Robert M. O'Bara's avatar
    ENH: Adding Property Support in Attribute XML Files · 9b722beb
    Robert M. O'Bara authored
    You can now set Properties on the Attribute Resource and on an Attribute via an XML file.
    
    Property Section for the Attribute Resource
    
    This is an optional section describing a set of properties  that should be
    added to the Attribute Resource.  The Property section is defined by a XML
    **Properties** node which is composed of a set of children **Property** nodes as shown below:
    
    ```xml
    
      <Properties>
        <Property Name="pi" Type="Int"> 42 </Property>
        <Property Name="pd" Type="double"> 3.141 </Property>
        <Property Name="ps" Type="STRING">Test string</Property>
        <Property Name="pb" Type="bool"> YES </Property>
      </Properties>
    ```
    
    You can also look at data/attribute/attribute_collection/propertiesExample.rst and smtk/attribute/testing/cxx/unitXmlReaderProperties.cxx for a sample XML file and test.
    
    Also added toBoolean method to StringUtils:
    The new method will convert a string to a boolean.  If the method was successful it will return true else it will return false.  All surround white-space is ignored and case is ignored.
    
    Current valid  values for true are: t, true, yes, 1
    Current valid  values for false are: f, false, no, 0
    9b722beb