gpt4 book ai didi

org.pageseeder.xmlwriter.XMLStringWriter类的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 22:16:40 26 4
gpt4 key购买 nike

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

XMLStringWriter介绍

暂无

代码示例

代码示例来源:origin: org.pageseeder.bastille/pso-bastille

XMLStringWriter xml = new XMLStringWriter(false, false);
xml.openElement("psml-file");
xml.attribute("name", file.getName());
xml.attribute("base", base);
 xml.attribute("status", "ok");
 XMLCopy.copyTo(file, xml);
 LOGGER.debug("loaded {}", file.getAbsolutePath());
 xml.attribute("status", "not-found");
 xml.writeText("Unable to find file: "+psml.path());
 LOGGER.debug("{} does not exist", file.getAbsolutePath());
xml.closeElement();
xml.flush();
return xml.toString();

代码示例来源:origin: org.pageseeder.bridge/pso-bridge

@Override
 public String toPSML() {
  try {
   XMLStringWriter xml = new XMLStringWriter(NamespaceAware.No);
   toXML(xml);
   return xml.toString();
  } catch (IOException ex) {
   // Should NEVER occur since we write to a string
   throw new IllegalStateException("Unable to write PSML for fragment", ex);
  }
 }
}

代码示例来源:origin: org.pageseeder.bastille/pso-bastille

XMLStringWriter xml = new XMLStringWriter(false, false);
xml.openElement("event");
xml.attribute("level", this._level.toString());
xml.attribute("logger", this._logger.getName());
xml.attribute("timestamp", Long.toString(this._timestamp));
xml.attribute("datetime", ISO8601.DATETIME.format(this._timestamp));
xml.attribute("message", message);
 xml.attribute("marker", this._marker.getName());
xml.closeElement();
return xml.toString();

代码示例来源:origin: org.pageseeder.bastille/pso-bastille

XMLStringWriter xml = new XMLStringWriter(false);
try {
 xml.openElement("psml-file");
 xml.attribute("name", file.getName());
 xml.attribute("base", psml.getBase());
 xml.attribute("status", "ok");
 List<File> linked = processLinks(psml, xml);
 xml.closeElement();
 xml.flush();
 data = xml.toString();
 entry = new CachedProcessed(data, linked);
 cache.put(new Element(psml.path(), entry));
 xml = new XMLStringWriter(false);
 xml.openElement("psml-file");
 xml.attribute("name", file.getName());
 xml.attribute("base", psml.getBase());
 xml.attribute("status", "error");
 xml.writeComment(ex.getMessage());
 xml.closeElement();
 xml.flush();
 data = xml.toString();

代码示例来源:origin: org.pageseeder.ox/pso-ox-core

XMLStringWriter writer = new XMLStringWriter(NamespaceAware.No);
writer.openElement("root");
List<File> files = data.getFiles(input);
for (File inputFile:files) {
 if (inputFile.exists()) {
  writer.writeXML(FileUtils.read(inputFile));
writer.closeElement();//root
writer.close();
FileUtils.write(writer.toString(), foutput);

代码示例来源:origin: org.pageseeder.bridge/pso-bridge

XMLStringWriter xml = this.xmlContent;
if (xml != null) {
 xml.openElement(uri, localName, true);
 for (int i = 0; i < atts.getLength(); i++) {
  String name = atts.getLocalName(i);
  String value = atts.getValue(i);
  if (name != null && value != null) {
   xml.attribute(atts.getURI(i), name, value);
} else if ("message".equals(localName) &&
  ((this.oldFormat && "threadstatus".equals(dad)) || (!this.oldFormat && "thread".equals(dad)))) {
 this.xmlContent = new XMLStringWriter(NamespaceAware.No);

代码示例来源:origin: org.pageseeder.berlioz/pso-berlioz

try {
 XMLStringWriter copy = new XMLStringWriter(NamespaceAware.No);
 copy.flush();
 String parsed = copy.toString();

代码示例来源:origin: org.pageseeder.bridge/pso-bridge

XMLStringWriter xml = this.xmlContent;
   if (xml != null) {
    tmp.addMessage(xml.toString());
    this.xmlContent = null;
XMLStringWriter xml = this.xmlContent;
if (xml != null) {
 xml.closeElement();

代码示例来源:origin: org.pageseeder.flint/pso-flint-solr

public static void main(String[] args) throws SolrFlintException, IOException {
  XMLWriter xml = new XMLStringWriter(NamespaceAware.No);
  ClusterStatus status = new SolrCollectionManager("http://localhost:8983/solr").getClusterStatus();
  if (status != null) status.toXML(xml);
  System.out.println(xml.toString());
 }
}

代码示例来源:origin: org.pageseeder.bridge/pso-bridge

xml.closeElement();

代码示例来源:origin: org.pageseeder.bridge/pso-bridge

@Override
public void characters(char[] ch, int start, int length) throws SAXException {
 XMLStringWriter xml = this.xmlContent;
 StringBuilder buf = this.buffer;
 if (xml != null) {
  xml.writeText(ch, start, length);
 } else if (buf != null) {
  buf.append(ch, start, length);
 }
}

代码示例来源:origin: org.pageseeder.flint/pso-flint-lucene

String extract = Documents.extract(Fields.toString(f), t.text(), 200);
if (extract != null) {
 XMLStringWriter xsw = new XMLStringWriter(NamespaceAware.No);
 xsw.openElement("extract");
 xsw.attribute("from", t.field());
 xsw.writeXML(extract);
 xsw.closeElement();
 extractXML = xsw.toString();
 break bigloop;

代码示例来源:origin: org.pageseeder.bastille/pso-bastille

@Override
public void process(ContentRequest req, XMLWriter xml) throws BerliozException, IOException {
 LOGGER.debug(req.getBerliozPath());
 // Get all the files
 String pathInfo = normalise(req.getBerliozPath());
 File dir = getDirectory(req);
 if (dir.exists() && dir.isDirectory()) {
  List<File> files = getContents(dir);
  long modified = lastModified(files);
  // Initialise the cache
  if (this.cache == null) {
   this.cache = newCache();
  }
  Element cached = this.cache.get(pathInfo);
  String data = null;
  if ((cached == null) || (cached.getLastUpdateTime() < modified)) {
   XMLStringWriter buffer = new XMLStringWriter(false);
   processOverview(dir, files, buffer);
   data = buffer.toString();
   this.cache.put(new Element(pathInfo, data));
  } else {
   data = (String)cached.getObjectValue();
  }
  xml.writeXML(data);
 }
}

代码示例来源:origin: org.pageseeder.bridge/pso-bridge

XMLStringWriter xml = this.xmlContent;
if (xml != null) {
 xml.openElement(uri, localName, true);
 for (int i = 0; i < atts.getLength(); i++) {
  String name = atts.getLocalName(i);
  String value = atts.getValue(i);
  if (name != null && value != null) {
   xml.attribute(atts.getURI(i), name, value);
    this.xmlContent = new XMLStringWriter(NamespaceAware.No);
   } else {
    this.buffer = new StringBuilder();

代码示例来源:origin: org.pageseeder.berlioz/pso-berlioz

XMLStringWriter copy = new XMLStringWriter(NamespaceAware.No);
copy.flush();
String parsed = copy.toString();

代码示例来源:origin: org.pageseeder.bridge/pso-bridge

@Override
public void characters(char[] ch, int start, int length) throws SAXException {
 XMLStringWriter xml = this.xmlContent;
 StringBuilder buf = this.buffer;
 if (xml != null) {
  xml.writeText(ch, start, length);
 } else if (buf != null) {
  buf.append(ch, start, length);
 }
}

代码示例来源:origin: org.pageseeder.bastille/pso-bastille

String data = null;
if (cached == null || cached.getLastUpdateTime() < modified) {
 XMLStringWriter buffer = new XMLStringWriter(false);
 processOverview(folder, files, buffer);
 data = buffer.toString();
 cache.put(new Element(folder.path(), data));
} else {

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