Added code to support examples + added example1.xml