Node root = doc.getRootNode();
root.addAttribute("xmlns", "http://rs.tdwg.org/dwc/xsd/simpledarwincore/");
root.addAttribute("xmlns:dc", "http://purl.org/dc/terms/");
root.addAttribute("xmlns:dwc", "http://rs.tdwg.org/dwc/terms/");
root.addAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
root.addAttribute("xsi:schemaLocation", "http://rs.tdwg.org/dwc/xsd/simpledarwincore/ http://rs.tdwg.org/dwc/xsd/tdwg_dwc_simple.xsd");
return doc;
}
public static void addRecordToRecordSet(Node recordSet, SimpleDarwinRecord record) {
Node entry = recordSet.addChildNode("SimpleDarwinRecord");