There should be some way to get the system to actually load the newer version of libxml2 from a "keg"

Thank you for explaining the situation. I barely grasp the problem, let alone the solution. I find people on other sites fixing similar sounding issues with the command:

brew link --force libxml2
I tried it to see what happens:
brew link --dry-run libxml2
Would link:
/usr/local/bin/xml2-config
/usr/local/bin/xmlcatalog
/usr/local/bin/xmllint
/usr/local/include/libxml2
/usr/local/share/aclocal/libxml.m4
/usr/local/share/doc/libxml2-2.9.7
/usr/local/share/gtk-doc/html/libxml2
/usr/local/share/man/man1/xml2-config.1
/usr/local/share/man/man1/xmlcatalog.1
/usr/local/share/man/man1/xmllint.1
/usr/local/share/man/man3/libxml.3
/usr/local/lib/cmake/libxml2
/usr/local/lib/libxml2.2.dylib
/usr/local/lib/libxml2.a
/usr/local/lib/libxml2.dylib
/usr/local/lib/pkgconfig/libxml-2.0.pc
/usr/local/lib/python2.7/site-packages/drv_libxml2.py
/usr/local/lib/python2.7/site-packages/libxml2.py
/usr/local/lib/python2.7/site-packages/libxml2_python-2.9.7-py2.7.egg-info
/usr/local/lib/python2.7/site-packages/libxml2mod.so
/usr/local/lib/xml2Conf.sh

If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/libxml2/bin:$PATH"' >> ~/.bash_profile
/usr/local/include/libxml2 looks interesting because I don't have it and can't find those links when looking for some of them. But I do have /usr/bin/xmllint already:
xmllint --version
xmllint: using libxml version 20904
I don't know what forcing that link will do to the system, what it will break, how to unforce...

In reply to Re^2: XML::LibXML setup of library paths by Anonymous Monk
in thread XML::LibXML setup of library paths by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.