GraphMLConverter and the associated DataUtil static utility functions rely on Flash/Flex's global Boolean() function to parse values typed as 'boolean' in GraphML. The code properly recognizes the type as 'boolean', but the value of boolean data can be incorrectly parsed as being 'true' even when the value is false. The problem occurs for two reasons:
1) When GraphMLConverter's parseData function calls DataUtil.parseValue it passes in the value to be parsed explicitly as a string
2) DataUtil.parseValue uses the global Boolean() function for Boolean types. Unfortunately, Boolean() treats _all_ non-empty strings (including "0" and "false") as being TRUE. See documentation at http://livedocs.adobe.com/flex/3/langref/package.html#Boolean%28%29 Thus, unless Boolean() receives an empty string, it will always return true in DataUtil.parseValue
Log in to post a comment.