Create a new {@link XmlFile} that matches on the provided DTD namespace.
194762
public static XmlFileDTD withDTDSystemId(String dtdNamespace)
    {
        XmlFile xmlFile = new XmlFile();
        xmlFile.dtdValidator.setSystemId(dtdNamespace);
        return xmlFile;
    }
1354835
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "valueFile")
    public JAXBElement<String> createValueFile(String value) {
        return new JAXBElement<String>(_ValueFile_QNAME, String.class, null, value);
    }
606463
private static Document createXML(String root, boolean useNamespace) {
		try {
			org.w3c.dom.Document doc = getDocumentBuilder(null, useNamespace).newDocument();
			doc.appendChild(doc.createElement(root));
			return new DocumentImpl(doc);
		} catch (Exception e) {
			throw new DomException(e);
		}
	}
876743
@XmlElementDecl(namespace = "http://www.w3.org/1998/Math/MathML", name = "mtd")
    public JAXBElement<MtdType> createMtd(MtdType value) {
        return new JAXBElement<MtdType>(_Mtd_QNAME, MtdType.class, null, value);
    }
76748
private void createTopicStump(final URI newFile) {
        try (final OutputStream newFileWriter = new FileOutputStream(new File(newFile))) {
            final XMLStreamWriter o = XMLOutputFactory.newInstance().createXMLStreamWriter(newFileWriter, UTF8);
            o.writeStartDocument();
            o.writeProcessingInstruction(PI_WORKDIR_TARGET, UNIX_SEPARATOR + new File(newFile.resolve(".")).getAbsolutePath());
            o.writeProcessingInstruction(PI_WORKDIR_TARGET_URI, newFile.resolve(".").toString());
            o.writeStartElement(ELEMENT_NAME_DITA);
            o.writeEndElement();
            o.writeEndDocument();
            o.close();
            newFileWriter.flush();
        } catch (final RuntimeException e) {
            throw e;
        } catch (final Exception e) {
            logger.error(e.getMessage(), e);
        }
    }
1072227
void generateAntIvyXml(Definition def, String outputDir)
   {
      try
      {
         FileWriter antfw = Utils.createFile("build.xml", outputDir);
         BuildIvyXmlGen bxGen = new BuildIvyXmlGen();
         bxGen.generate(def, antfw);
         antfw.close();

         FileWriter ivyfw = Utils.createFile("ivy.xml", outputDir);
         IvyXmlGen ixGen = new IvyXmlGen();
         ixGen.generate(def, ivyfw);
         ivyfw.close();

         FileWriter ivySettingsfw = Utils.createFile("ivy.settings.xml", outputDir);
         IvySettingsXmlGen isxGen = new IvySettingsXmlGen();
         isxGen.generate(def, ivySettingsfw);
         ivySettingsfw.close();
      }
      catch (IOException ioe)
      {
         ioe.printStackTrace();
      }
   }
60909
static File createSegmentFile(String name, File directory, long id, long version) {
    return new File(directory, String.format("%s-%d-%d.log", Assert.notNull(name, "name"), id, version));
  }
538872
public static ChunksManifest createManifestFrom(InputStream xml) {
        try {
            ChunksManifestDocument doc = ChunksManifestDocument.Factory.parse(
                xml);
            return ManifestElementReader.createManifestFrom(doc);
        } catch (XmlException e) {
            throw new DuraCloudRuntimeException(e);
        } catch (IOException e) {
            throw new DuraCloudRuntimeException(e);
        }
    }
79735
def dtdElementDesc(self, name):
        
        ret = libxml2mod.xmlGetDtdElementDesc(self._o, name)
        if ret is None:raise treeError('xmlGetDtdElementDesc() failed')
        __tmp = xmlElement(_obj=ret)
        return __tmp
99987
@Override
    public XMLValidator createValidator(ValidationContext ctxt)
        throws XMLStreamException
    {
        if (mFullyValidating) {
            return new DTDValidator(this, ctxt, mHasNsDefaults,
                                    getElementMap(), getGeneralEntityMap());
        }
        return new DTDTypingNonValidator(this, ctxt, mHasNsDefaults,
                                         getElementMap(), getGeneralEntityMap());

    }
1282402
public Node copyFile(Node dest) throws FileNotFoundException, CopyException {
        try (OutputStream out = dest.newOutputStream()) {
            copyFileTo(out);
        } catch (FileNotFoundException e) {
            throw e;
        } catch (IOException e) {
            throw new CopyException(this, dest, e);
        }
        return this;
    }
305027
public static void infoOnGeneratedFile(Class<BindDataSource> annotation, File schemaCreateFile) {
		String msg = String.format("file '%s' in directory '%s' is generated by '@%s' annotation processor", schemaCreateFile.getName(), schemaCreateFile.getParentFile(), annotation.getSimpleName());
		
		printMessage(msg);		
	}
1187123
public FlyWeightFlatXmlDataSet build(InputStream xmlInputStream) throws DataSetException {
        InputSource inputSource = new InputSource(xmlInputStream);
        return buildInternal(inputSource);
    }
182365
def newDocPI(self, name, content):
        
        ret = libxml2mod.xmlNewDocPI(self._o, name, content)
        if ret is None:raise treeError('xmlNewDocPI() failed')
        __tmp = xmlNode(_obj=ret)
        return __tmp
687951
private File getFile(String xmlFilename) {

        File file = new File(m_basePath + xmlFilename);
        if (!file.exists() || !file.canRead()) {
            file = new File(xmlFilename);
        }
        return file;
    }
1047257
protected Map<Namespace, List<String>> createNamespaceMap(List<NamespaceDefinition> namespaceDefs) throws XmlException {
        ArrayList<Namespace> namespaces = new ArrayList<Namespace>();

        // add all root namespaces
        for(NamespaceDefinition namespaceDef: namespaceDefs) {
            Namespace node = new Namespace(namespaceDef);
            if(namespaces.contains(node)) {
                throw new XmlException("duplicate NamespaceDefinitions found: " + node.getId());
            }
            namespaces.add(node);
        }

        // go through each namespace's dependencies to see if any are missing
        for(Namespace namespace: namespaces) {
            List<String> dependencyIds = namespace.getDirectDependencyIds();
            for(String id: dependencyIds) {
                if(find(namespaces, id) == null) {
                    throw new XmlException("Found missing dependency: " + id);
                }
            }
        }

        HashMap<Namespace, List<String>> namespaceFullDependencyMap = new HashMap<Namespace, List<String>>();
        for(Namespace namespace: namespaces) {
            ArrayList<String> fullDependencies = new ArrayList<String>();

            for(String directDependencyId: namespace.getDirectDependencyIds()) {
                addDependenciesRecursively(namespace, namespaces, directDependencyId, fullDependencies);
            }

            namespaceFullDependencyMap.put(namespace, fullDependencies);
        }

        return(namespaceFullDependencyMap);
    }
538787
static XMLName create(String defaultNamespaceUri, String name) {
        if (name == null)
            throw new IllegalArgumentException();

        int l = name.length();
        if (l != 0) {
            char firstChar = name.charAt(0);
            if (firstChar == '*') {
                if (l == 1) {
                    return XMLName.formStar();
                }
            } else if (firstChar == '@') {
                XMLName xmlName = XMLName.formProperty("", name.substring(1));
                xmlName.setAttributeName();
                return xmlName;
            }
        }

        return XMLName.formProperty(defaultNamespaceUri, name);
    }