This article relies largely or entirely on a single source. (November 2018)
Xylophagy is a term used in ecology to describe the habits of an herbivorous animal whose diet consists primarily (often solely) of wood. The word derives from Greek ξυλοφάγος (xulophagos) "eating wood", from ξύλον (xulon) "wood" and φαγεῖν (phagein) "to eat", an ancient Greek name for a kind of a worm-eating bird. Animals feeding only on dead wood are called sapro-xylophagous or saproxylic.
Most such animals are arthropods, primarily insects of various kinds, in which the behavior is quite common, and found in many different orders. It is not uncommon for insects to specialize to various degrees; in some cases, they limit themselves to certain plant groups (a taxonomic specialization), and in others, it is the physical characteristics of the wood itself (e.g., state of decay, hardness, whether the wood is alive or dead, or the choice of heartwood versus sapwood versus bark).
Many xylophagous insects have symbiotic protozoa and/or bacteria in their digestive system which assist in the breakdown of cellulose; others (e.g., the termite family Termitidae) possess their own cellulase. Others, especially among the groups feeding on decaying wood, apparently derive much of their nutrition from the digestion of various fungi that are growing amidst the wood fibers. Such insects often carry the spores of the fungi in special structures on their bodies (called "mycangia"), and infect the host tree themselves when they are laying their eggs.