Writ of habeas corpus shall be granted in favor of parents, guardians, masters, husbands and wives; and to enforce the rights and for the protection of infants and insane persons; and the proceedings shall, in all such cases, conform to the provisions of this article.
R.L. 1910, § 4905.