private static List<String> getHostAliases(NodeList hostAliases) {
        List<String> aliases = new LinkedList<>();
        for (int i = 0; i < hostAliases.getLength(); i++) {
            Node n = hostAliases.item(i);
            if (! (n instanceof Element e)) {
                continue;
            }
            if (! e.getNodeName().equals("alias")) {
                throw new IllegalArgumentException("Unexpected tag: '" + e.getNodeName() + "' at node " +
                                                   XML.getNodePath(e, " > ") + ", expected 'alias'.");
            }
            String alias = e.getFirstChild().getNodeValue();
            if ((alias == null) || (alias.isEmpty())) {
                throw new IllegalArgumentException("Missing value for the alias tag at node " +
                                                   XML.getNodePath(e, " > ") + "'.");
            }
            aliases.add(alias);
        }
        return aliases;
    }
Get all aliases for one host from a list of 'alias' xml nodes.

@param hostAliases  List of xml nodes, each representing one hostalias
@return a list of alias strings.
config-model/src/main/java/com/yahoo/config/model/provision/Hosts.java