Restore libxml2 to Yosemite
Enter /sbin/mount -uw / and copy 'libxml2.2.dylib' from '/usr/local/opt/libxml/lib/' to '/usr/lib/'

Restart your Mac and restore the original file:

Download Pacifist (i think it's a 14-day trial) and the Yosemite System Installer

Right-click the 'Install OS X Yosemite.app' -&gt; 'Show Package Contents'

Mount ./Contents/SharedSupport/InstallESD.dmg


Open the mounted 'OS X Install ESD'

Open ./Packages/BaseSystemBinaries.pkg with Pacifist

In the new Pacifist-window navigate to 'Content of BaseSystemBinaries/usr/lib/libxml2.2.dylib'

Right-click libxml2.2.dylib and install it

Restart your Mac