case Node.PROCESSING_INSTRUCTION_NODE:
XmlProcessingInstruction xmlProcessingInstruction = (XmlProcessingInstruction) NokogiriService.XML_PROCESSING_INSTRUCTION_ALLOCATOR.allocate(runtime, getNokogiriClass(runtime, "Nokogiri::XML::ProcessingInstruction"));
xmlProcessingInstruction.setNode(runtime.getCurrentContext(), node);
return xmlProcessingInstruction;
case Node.CDATA_SECTION_NODE:
XmlCdata xmlCdata = (XmlCdata) NokogiriService.XML_CDATA_ALLOCATOR.allocate(runtime, getNokogiriClass(runtime, "Nokogiri::XML::CDATA"));
xmlCdata.setNode(runtime.getCurrentContext(), node);
return xmlCdata;
case Node.DOCUMENT_NODE:
XmlDocument xmlDocument = (XmlDocument) NokogiriService.XML_DOCUMENT_ALLOCATOR.allocate(runtime, getNokogiriClass(runtime, "Nokogiri::XML::Document"));
xmlDocument.setDocumentNode(runtime.getCurrentContext(), node);
return xmlDocument;