According to the API documentation at https://github.com/veg/phylotree.js/blob/master/API.md#new-phylotreenwk-options, a PhyloXML string should be accepted by the constructor.
It instead expects it as an already parsed XML document.
Rather than changing the documentation, I suggest enabling both types of input by calling an XML parser if the passed parameter is a string.
According to the API documentation at https://github.com/veg/phylotree.js/blob/master/API.md#new-phylotreenwk-options, a PhyloXML string should be accepted by the constructor. It instead expects it as an already parsed XML document. Rather than changing the documentation, I suggest enabling both types of input by calling an XML parser if the passed parameter is a string.