Accessing element tree within dylib