protected Element makeTree()

in src/main/org/apache/ant/dotnet/build/MSBuildTask.java [88:107]


    protected Element makeTree(DocumentFragment f) {
        NodeList nl = f.getChildNodes();
        if (nl.getLength() == 1 
            && nl.item(0).getNodeType() == Node.ELEMENT_NODE
            && nl.item(0).getNodeName().equals(ROOT)) {
            return (Element) nl.item(0);
        } else {
            Element p = f.getOwnerDocument().createElementNS(MSBUILD_NS,
							     ROOT);
            p.setAttribute("DefaultTargets", TARGET);

            Element t = f.getOwnerDocument().createElementNS(MSBUILD_NS,
							     "Target");
            t.setAttribute("Name", TARGET);

            p.appendChild(t);
            t.appendChild(f);
            return p;
        }
    }