gpt4 book ai didi

com.ctc.wstx.sw.XmlWriter.writeTypedElement()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 00:09:05 30 4
gpt4 key购买 nike

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

XmlWriter.writeTypedElement介绍

[英]Like #writeRaw, but caller guarantees that the contents additionally are known to be in 7-bit ascii range, and also passes an encoder object that will encode values only when being handed a buffer to append to.
[中]与#writeRaw类似,但调用者保证额外的内容在7位ascii范围内,并且还传递一个编码器对象,该对象仅在向其提供要附加的缓冲区时才会对值进行编码。

代码示例

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl

protected final void writeTypedElement(AsciiValueEncoder enc)
  throws XMLStreamException
{
  if (mStartElementOpen) {
    closeStartElement(mEmptyElement);
  }
  // How about well-formedness?
  if (mCheckStructure) {
    if (inPrologOrEpilog()) {
      reportNwfStructure(ErrorConsts.WERR_PROLOG_NONWS_TEXT);
    }
  }
  // Or validity?
  if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) {
    reportInvalidContent(CHARACTERS);
  }
  // So far so good: let's serialize
  try {
    XMLValidator vld = (mVldContent == XMLValidator.CONTENT_ALLOW_VALIDATABLE_TEXT) ?
      mValidator : null;
    if (vld == null) {
      mWriter.writeTypedElement(enc);
    } else {
      mWriter.writeTypedElement(enc, vld, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throw new WstxIOException(ioe);
  }
}

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl

protected final void writeTypedElement(AsciiValueEncoder enc)
  throws XMLStreamException
{
  if (mStartElementOpen) {
    closeStartElement(mEmptyElement);
  }
  // How about well-formedness?
  if (mCheckStructure) {
    if (inPrologOrEpilog()) {
      reportNwfStructure(ErrorConsts.WERR_PROLOG_NONWS_TEXT);
    }
  }
  // Or validity?
  if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) {
    reportInvalidContent(CHARACTERS);
  }
  // So far so good: let's serialize
  try {
    XMLValidator vld = (mVldContent == XMLValidator.CONTENT_ALLOW_VALIDATABLE_TEXT) ?
      mValidator : null;
    if (vld == null) {
      mWriter.writeTypedElement(enc);
    } else {
      mWriter.writeTypedElement(enc, vld, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throw new WstxIOException(ioe);
  }
}

代码示例来源:origin: Nextdoor/bender

protected final void writeTypedElement(AsciiValueEncoder enc)
  throws XMLStreamException
{
  if (mStartElementOpen) {
    closeStartElement(mEmptyElement);
  }
  // How about well-formedness?
  if (mCheckStructure) {
    if (inPrologOrEpilog()) {
      reportNwfStructure(ErrorConsts.WERR_PROLOG_NONWS_TEXT);
    }
  }
  // Or validity?
  if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) {
    reportInvalidContent(CHARACTERS);
  }
  // So far so good: let's serialize
  try {
    XMLValidator vld = (mVldContent == XMLValidator.CONTENT_ALLOW_VALIDATABLE_TEXT) ?
      mValidator : null;
    if (vld == null) {
      mWriter.writeTypedElement(enc);
    } else {
      mWriter.writeTypedElement(enc, vld, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throw new WstxIOException(ioe);
  }
}

代码示例来源:origin: com.fasterxml.woodstox/woodstox-core

protected final void writeTypedElement(AsciiValueEncoder enc)
  throws XMLStreamException
{
  if (mStartElementOpen) {
    closeStartElement(mEmptyElement);
  }
  // How about well-formedness?
  if (mCheckStructure) {
    if (inPrologOrEpilog()) {
      reportNwfStructure(ErrorConsts.WERR_PROLOG_NONWS_TEXT);
    }
  }
  // Or validity?
  if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) {
    reportInvalidContent(CHARACTERS);
  }
  // So far so good: let's serialize
  try {
    XMLValidator vld = (mVldContent == XMLValidator.CONTENT_ALLOW_VALIDATABLE_TEXT) ?
      mValidator : null;
    if (vld == null) {
      mWriter.writeTypedElement(enc);
    } else {
      mWriter.writeTypedElement(enc, vld, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throw new WstxIOException(ioe);
  }
}

代码示例来源:origin: FasterXML/woodstox

protected final void writeTypedElement(AsciiValueEncoder enc)
  throws XMLStreamException
{
  if (mStartElementOpen) {
    closeStartElement(mEmptyElement);
  }
  // How about well-formedness?
  if (mCheckStructure) {
    if (inPrologOrEpilog()) {
      reportNwfStructure(ErrorConsts.WERR_PROLOG_NONWS_TEXT);
    }
  }
  // Or validity?
  if (mVldContent <= XMLValidator.CONTENT_ALLOW_WS) {
    reportInvalidContent(CHARACTERS);
  }
  // So far so good: let's serialize
  try {
    XMLValidator vld = (mVldContent == XMLValidator.CONTENT_ALLOW_VALIDATABLE_TEXT) ?
      mValidator : null;
    if (vld == null) {
      mWriter.writeTypedElement(enc);
    } else {
      mWriter.writeTypedElement(enc, vld, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throw new WstxIOException(ioe);
  }
}

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