gpt4 book ai didi

net.sf.okapi.common.XMLWriter.writeEndElement()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 05:11:05 29 4
gpt4 key购买 nike

本文整理了Java中net.sf.okapi.common.XMLWriter.writeEndElement()方法的一些代码示例,展示了XMLWriter.writeEndElement()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLWriter.writeEndElement()方法的具体详情如下:
包路径:net.sf.okapi.common.XMLWriter
类名称:XMLWriter
方法名:writeEndElement

XMLWriter.writeEndElement介绍

[英]Writes the end of the last started element.
[中]写入上次启动的元素的结尾。

代码示例

代码示例来源:origin: net.sf.okapi.connectors/okapi-connector-microsoft

public String toXML() {
    StringWriter sw = new StringWriter();
    XMLWriter xml = new XMLWriter(sw);
    xml.writeStartDocument();
    xml.writeStartElement("TranslateOptions");
    xml.writeAttributeString("xmlns", "http://schemas.datacontract.org/2004/07/Microsoft.MT.Web.Service.V2");
    xml.writeStartElement("Category");
    xml.writeString(this.category);
    xml.writeEndElement();
    xml.writeStartElement("ContentType");
    xml.writeString(this.contentType);
    xml.writeEndElement();
    xml.writeStartElement("ReservedFlags");
    xml.writeEndElement();
    xml.writeStartElement("State");
    xml.writeEndElement();
    xml.writeStartElement("Uri");
    xml.writeEndElement();
    xml.writeStartElement("User");
    xml.writeString("defaultUser");
    xml.writeEndElement();
    xml.writeEndElement(); // !TranslateOptions
    xml.close();
    return sw.toString();
  }
}

代码示例来源:origin: net.sf.okapi/okapi-core

writer.writeStartElement("seg");
writer.writeRawXML(tmxCont.setContent(source).toString());
writer.writeEndElement(); // seg
  writer.writeEndElement(); // seg

代码示例来源:origin: net.sf.okapi.steps/okapi-step-rainbowkit

XR.writeEndElement(); // omegat

代码示例来源:origin: net.sf.okapi.steps/okapi-step-leveraging

private void finishTemporaryFiles (XMLWriter htmlWriter) {
  // Close the temporary source input
  if ( htmlWriter != null ) {
    htmlWriter.writeEndElement(); // html
    htmlWriter.writeEndDocument();
    htmlWriter.close();
    // htmlWriter should be reset to null by the caller 
  }
  
  // Close the original entry store
  if ( store != null ) {
    store.close();
  }
}

代码示例来源:origin: net.sf.okapi/okapi-core

writer.writeAttributeString("type", name);
      writer.writeString(contForProp.getProperty(name).getValue());
      writer.writeEndElement(); // prop
      propWritten = true;
writer.writeEndElement(); // seg

代码示例来源:origin: net.sf.okapi.connectors/okapi-connector-microsoft

xmlWriter.writeElementString("o:Uri", "");
xmlWriter.writeElementString("o:User", "");
xmlWriter.writeEndElement(); // Options
xmlWriter.writeStartElement("Texts");
xmlWriter.writeAttributeString("xmlns:s", "http://schemas.microsoft.com/2003/10/Serialization/Arrays");
  xmlWriter.writeStartElement("s:string");
  xmlWriter.writeString(text);
  xmlWriter.writeEndElement();
xmlWriter.writeEndElement(); // !Texts
xmlWriter.writeElementString("To", trgLang);
xmlWriter.writeElementString("MaxTranslations", String.valueOf(maxHits));
xmlWriter.writeEndElement(); // !GetTranslationsArrayRequest
xmlWriter.writeEndDocument();
xmlWriter.close();

代码示例来源:origin: net.sf.okapi/okapi-core

writer.writeStartElement("external-file");
writer.writeAttributeString("href", skeletonPath);
writer.writeEndElement(); // external-file
writer.writeEndElement(); // skl
  writer.writeRawXML(params.getToolXmlSnippet());
writer.writeEndElement(); // tool

代码示例来源:origin: net.sf.okapi.steps/okapi-step-translationcomparison

writer.writeRawXML("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"); //$NON-NLS-1$
writer.writeRawXML("<style>td { font-family: monospace } td { vertical-align: top; white-space: pre } td.p { border-top-style: solid; border-top-width: 1px;}</style>"); //$NON-NLS-1$
writer.writeEndElement(); // head
writer.writeStartElement("body"); //$NON-NLS-1$
writer.writeStartElement("h1"); //$NON-NLS-1$
writer.writeString("Translation Comparison");
writer.writeEndElement();
writer.writeStartElement("p"); //$NON-NLS-1$
writer.writeString(String.format("Base document (%s): %s",
writer.writeEndElement();
writer.writeRawXML("<p>ED-Score = Edit distance score, FM-Score = Fuzzy Match score.<br/>For details see: "
  +"<a href='"+WIKIURL+"'>"+WIKIURL+"</a>.</p>");

代码示例来源:origin: net.sf.okapi.steps/okapi-step-translationcomparison

writer.writeEndElement(); // table
writer.writeElementString("p", String.format("", itemCount));
if ( itemCount > 0 ) {
  writer.writeAttributeString("id", "summary");
  writer.writeString("Summary");
  writer.writeEndElement();
  writer.writeRawXML("</b></td></tr>\n"); //$NON-NLS-1$
  writer.writeEndElement(); // table    			
  writer.writeElementString("p", " ");    			
writer.writeEndElement(); // body
writer.writeEndElement(); // html
writer.close();

代码示例来源:origin: net.sf.okapi/okapi-core

writer.writeStartElement("note");
      writer.writeString(p.getValue());
      writer.writeEndElement();
    } else {
      writer.writeStartElement("prop");
      writer.writeAttributeString("type", p.getName());                    
      writer.writeString(p.getValue());
      writer.writeEndElement();
writer.writeEndElement(); // header

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com