* @throws java.io.IOException on error
     * @throws com.itextpdf.text.DocumentException o error
     */
    public void mergeXfaData(Node n) throws IOException, DocumentException {
        XfaForm.Xml2SomDatasets data = new XfaForm.Xml2SomDatasets(n);
        for (String string : data.getOrder()) {
            String name = string;
            String text = XfaForm.getNodeText(data.getName2Node().get(name));
            setField(name, text);
        }
    }