gpt4 book ai didi

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

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

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

XmlWriter.writeTypedAttribute介绍

[英]Method similar to #writeAttribute(String,String,char[],int,int)but where is known not to require escaping. Validation of the attribute value must be done by calling given validator appropriately.
[中]方法类似于#writeAttribute(String,String,char[],int,int),但已知其中不需要转义。属性值的验证必须通过适当地调用给定的验证器来完成。

代码示例

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

protected void writeTypedAttribute(String prefix, String nsURI, String localName,
                  AsciiValueEncoder enc)
  throws XMLStreamException
{
  if (!mStartElementOpen) {
    throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM);
  }
  if (mCheckAttrs) { // still need to ensure no duplicate attrs?
    mCurrElem.checkAttrWrite(nsURI, localName);
  }
  try {
    if (mValidator == null) {
       if (prefix == null || prefix.length() == 0) {
         mWriter.writeTypedAttribute(localName, enc);
       } else {
         mWriter.writeTypedAttribute(prefix, localName, enc);
       }
    } else {
      mWriter.writeTypedAttribute
        (prefix, localName, nsURI, enc, mValidator, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throw new WstxIOException(ioe);
  }
}

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

protected void writeTypedAttribute(String prefix, String nsURI, String localName,
                  AsciiValueEncoder enc)
  throws XMLStreamException
{
  // note: mostly copied from the other writeAttribute() method..
  if (!mStartElementOpen && mCheckStructure) {
    reportNwfStructure(ErrorConsts.WERR_ATTR_NO_ELEM);
  }
  if (mCheckAttrs) { // doh. Not good, need to construct non-transient value...
    if (mAttrNames == null) {
      mAttrNames = new TreeSet();
    }
    if (!mAttrNames.add(localName)) {
      reportNwfAttr("Trying to write attribute '"+localName+"' twice");
    }
  }
  try {
    if (mValidator == null) {
      mWriter.writeTypedAttribute(localName, enc);
    } else {
      mWriter.writeTypedAttribute(null, localName, null, enc, mValidator, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throwFromIOE(ioe);
  }
}

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

@Override
protected void writeTypedAttribute(String prefix, String nsURI, String localName,
                  AsciiValueEncoder enc)
  throws XMLStreamException
{
  if (!mStartElementOpen) {
    throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM);
  }
  if (mCheckAttrs) { // still need to ensure no duplicate attrs?
    mCurrElem.checkAttrWrite(nsURI, localName);
  }
  try {
    if (mValidator == null) {
       if (prefix == null || prefix.length() == 0) {
         mWriter.writeTypedAttribute(localName, enc);
       } else {
         mWriter.writeTypedAttribute(prefix, localName, enc);
       }
    } else {
      mWriter.writeTypedAttribute
        (prefix, localName, nsURI, enc, mValidator, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throw new WstxIOException(ioe);
  }
}

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

protected void writeTypedAttribute(String prefix, String nsURI, String localName,
                  AsciiValueEncoder enc)
  throws XMLStreamException
{
  if (!mStartElementOpen) {
    throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM);
  }
  if (mCheckAttrs) { // still need to ensure no duplicate attrs?
    mCurrElem.checkAttrWrite(nsURI, localName);
  }
  try {
    if (mValidator == null) {
       if (prefix == null || prefix.length() == 0) {
         mWriter.writeTypedAttribute(localName, enc);
       } else {
         mWriter.writeTypedAttribute(prefix, localName, enc);
       }
    } else {
      mWriter.writeTypedAttribute
        (prefix, localName, nsURI, enc, mValidator, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throw new WstxIOException(ioe);
  }
}

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

@Override
protected void writeTypedAttribute(String prefix, String nsURI, String localName,
                  AsciiValueEncoder enc)
  throws XMLStreamException
{
  if (!mStartElementOpen) {
    throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM);
  }
  if (mCheckAttrs) { // still need to ensure no duplicate attrs?
    mCurrElem.checkAttrWrite(nsURI, localName);
  }
  try {
    if (mValidator == null) {
       if (prefix == null || prefix.length() == 0) {
         mWriter.writeTypedAttribute(localName, enc);
       } else {
         mWriter.writeTypedAttribute(prefix, localName, enc);
       }
    } else {
      mWriter.writeTypedAttribute
        (prefix, localName, nsURI, enc, mValidator, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throw new WstxIOException(ioe);
  }
}

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

@Override
protected void writeTypedAttribute(String prefix, String nsURI, String localName,
                  AsciiValueEncoder enc)
  throws XMLStreamException
{
  if (!mStartElementOpen) {
    throwOutputError(ErrorConsts.WERR_ATTR_NO_ELEM);
  }
  if (mCheckAttrs) { // still need to ensure no duplicate attrs?
    mCurrElem.checkAttrWrite(nsURI, localName);
  }
  try {
    if (mValidator == null) {
       if (prefix == null || prefix.length() == 0) {
         mWriter.writeTypedAttribute(localName, enc);
       } else {
         mWriter.writeTypedAttribute(prefix, localName, enc);
       }
    } else {
      mWriter.writeTypedAttribute
        (prefix, localName, nsURI, enc, mValidator, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throw new WstxIOException(ioe);
  }
}

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

@Override
protected void writeTypedAttribute(String prefix, String nsURI, String localName,
                  AsciiValueEncoder enc)
  throws XMLStreamException
{
  // note: mostly copied from the other writeAttribute() method..
  if (!mStartElementOpen && mCheckStructure) {
    reportNwfStructure(ErrorConsts.WERR_ATTR_NO_ELEM);
  }
  if (mCheckAttrs) { // doh. Not good, need to construct non-transient value...
    if (mAttrNames == null) {
      mAttrNames = new TreeSet<String>();
    }
    if (!mAttrNames.add(localName)) {
      reportNwfAttr("Trying to write attribute '"+localName+"' twice");
    }
  }
  try {
    if (mValidator == null) {
      mWriter.writeTypedAttribute(localName, enc);
    } else {
      mWriter.writeTypedAttribute(null, localName, null, enc, mValidator, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throwFromIOE(ioe);
  }
}

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

@Override
protected void writeTypedAttribute(String prefix, String nsURI, String localName,
                  AsciiValueEncoder enc)
  throws XMLStreamException
{
  // note: mostly copied from the other writeAttribute() method..
  if (!mStartElementOpen && mCheckStructure) {
    reportNwfStructure(ErrorConsts.WERR_ATTR_NO_ELEM);
  }
  if (mCheckAttrs) { // doh. Not good, need to construct non-transient value...
    if (mAttrNames == null) {
      mAttrNames = new TreeSet<String>();
    }
    if (!mAttrNames.add(localName)) {
      reportNwfAttr("Trying to write attribute '"+localName+"' twice");
    }
  }
  try {
    if (mValidator == null) {
      mWriter.writeTypedAttribute(localName, enc);
    } else {
      mWriter.writeTypedAttribute(null, localName, null, enc, mValidator, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throwFromIOE(ioe);
  }
}

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

protected void writeTypedAttribute(String prefix, String nsURI, String localName,
                  AsciiValueEncoder enc)
  throws XMLStreamException
{
  // note: mostly copied from the other writeAttribute() method..
  if (!mStartElementOpen && mCheckStructure) {
    reportNwfStructure(ErrorConsts.WERR_ATTR_NO_ELEM);
  }
  if (mCheckAttrs) { // doh. Not good, need to construct non-transient value...
    if (mAttrNames == null) {
      mAttrNames = new TreeSet();
    }
    if (!mAttrNames.add(localName)) {
      reportNwfAttr("Trying to write attribute '"+localName+"' twice");
    }
  }
  try {
    if (mValidator == null) {
      mWriter.writeTypedAttribute(localName, enc);
    } else {
      mWriter.writeTypedAttribute(null, localName, null, enc, mValidator, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throwFromIOE(ioe);
  }
}

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

@Override
protected void writeTypedAttribute(String prefix, String nsURI, String localName,
                  AsciiValueEncoder enc)
  throws XMLStreamException
{
  // note: mostly copied from the other writeAttribute() method..
  if (!mStartElementOpen && mCheckStructure) {
    reportNwfStructure(ErrorConsts.WERR_ATTR_NO_ELEM);
  }
  if (mCheckAttrs) { // doh. Not good, need to construct non-transient value...
    if (mAttrNames == null) {
      mAttrNames = new TreeSet<String>();
    }
    if (!mAttrNames.add(localName)) {
      reportNwfAttr("Trying to write attribute '"+localName+"' twice");
    }
  }
  try {
    if (mValidator == null) {
      mWriter.writeTypedAttribute(localName, enc);
    } else {
      mWriter.writeTypedAttribute(null, localName, null, enc, mValidator, getCopyBuffer());
    }
  } catch (IOException ioe) {
    throwFromIOE(ioe);
  }
}

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