gpt4 book ai didi

org.codehaus.stax2.validation.XMLValidator.validateElementEnd()方法的使用及代码示例

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

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

XMLValidator.validateElementEnd介绍

[英]Method called right after encountering an element close tag.
[中]方法在遇到元素close标记后立即调用。

代码示例

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

/**
 * Method called after parsing (but before returning) end element,
 * to allow for pluggable validators to verify correctness of
 * the content model for the closing element.
 *
 * @return Validation state that should be effective for the parent
 *   element state
 */
public int validateEndElement()
  throws XMLStreamException
{
  if (mValidator == null) { // should never be null if we get here
    return XMLValidator.CONTENT_ALLOW_ANY_TEXT;
  }
  int result =  mValidator.validateElementEnd
    (mCurrElement.mLocalName, mCurrElement.mNamespaceURI, mCurrElement.mPrefix);
  if (mDepth == 1) { // root closing
    mValidator.validationCompleted(true);
  }
  return result;
}

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

mVldContent = mValidator.validateElementEnd(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);

代码示例来源:origin: woodstox/wstx-lgpl

public int validateElementEnd(String localName, String uri, String prefix)
  throws XMLValidationException
{
  int textType1 = mFirst.validateElementEnd(localName, uri, prefix);
  int textType2 = mSecond.validateElementEnd(localName, uri, prefix);
  // As with earlier, let's return stricter of the two
  return (textType1 < textType2) ? textType1 : textType2;
}

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

public int validateElementEnd(String localName, String uri, String prefix)
  throws XMLStreamException
{
  int textType1 = mFirst.validateElementEnd(localName, uri, prefix);
  int textType2 = mSecond.validateElementEnd(localName, uri, prefix);
  // As with earlier, let's return stricter of the two
  return (textType1 < textType2) ? textType1 : textType2;
}

代码示例来源:origin: woodstox/wstx-asl

public int validateElementEnd(String localName, String uri, String prefix)
  throws XMLValidationException
{
  int textType1 = mFirst.validateElementEnd(localName, uri, prefix);
  int textType2 = mSecond.validateElementEnd(localName, uri, prefix);
  // As with earlier, let's return stricter of the two
  return (textType1 < textType2) ? textType1 : textType2;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox

public int validateElementEnd(String localName, String uri, String prefix)
  throws XMLValidationException
{
  int textType1 = mFirst.validateElementEnd(localName, uri, prefix);
  int textType2 = mSecond.validateElementEnd(localName, uri, prefix);
  // As with earlier, let's return stricter of the two
  return (textType1 < textType2) ? textType1 : textType2;
}

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

mVldContent = mValidator.validateElementEnd(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);
mVldContent = mValidator.validateElementEnd(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);

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

mVldContent = mValidator.validateElementEnd(localName, nsURI, prefix);
mVldContent = mValidator.validateElementEnd(localName, nsURI, prefix);

代码示例来源:origin: woodstox/wstx-lgpl

/**
 * @return Validation state that should be effective for the parent
 *   element state
 */
public int pop()
  throws XMLStreamException
{
  if (mSize == 0) {
    throw new IllegalStateException("Popping from empty stack.");
  }
  if (mValidator == null) {
    /* Let's allow GCing (not likely to matter, as Strings are very
     * likely interned... but it's a good habit
     */
    mElements[--mSize] = null;
    return XMLValidator.CONTENT_ALLOW_ANY_TEXT;
  }
  /* Note: can and should not shrink the stack before calling
   * validator (since it can do a callback to access the info --
   * not just the current element, but possibly other related data
   * like stack depth)
   */
  int size = mSize-1;
  int result = mValidator.validateElementEnd(mElements[size], null, null);
  mSize = size;
  mElements[size] = null;
  return result;
}

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

mVldContent = mValidator.validateElementEnd
  (curr.getLocalName(), curr.getNamespaceURI(), curr.getPrefix());

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox

/**
 * @return Validation state that should be effective for the parent
 *   element state
 */
public int pop()
  throws XMLStreamException
{
  if (mSize == 0) {
    throw new IllegalStateException("Popping from empty stack.");
  }
  if (mValidator == null) {
    /* Let's allow GCing (not likely to matter, as Strings are very
     * likely interned... but it's a good habit
     */
    mElements[--mSize] = null;
    return XMLValidator.CONTENT_ALLOW_ANY_TEXT;
  }
  /* Note: can and should not shrink the stack before calling
   * validator (since it can do a callback to access the info --
   * not just the current element, but possibly other related data
   * like stack depth)
   */
  int size = mSize-1;
  int result = mValidator.validateElementEnd(mElements[size], null, null);
  mSize = size;
  mElements[size] = null;
  return result;
}

代码示例来源:origin: woodstox/wstx-asl

/**
 * @return Validation state that should be effective for the parent
 *   element state
 */
public int pop()
  throws XMLStreamException
{
  if (mSize == 0) {
    throw new IllegalStateException("Popping from empty stack.");
  }
  if (mValidator == null) {
    /* Let's allow GCing (not likely to matter, as Strings are very
     * likely interned... but it's a good habit
     */
    mElements[--mSize] = null;
    return XMLValidator.CONTENT_ALLOW_ANY_TEXT;
  }
  /* Note: can and should not shrink the stack before calling
   * validator (since it can do a callback to access the info --
   * not just the current element, but possibly other related data
   * like stack depth)
   */
  int size = mSize-1;
  int result = mValidator.validateElementEnd(mElements[size], null, null);
  mSize = size;
  mElements[size] = null;
  return result;
}

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

/**
 * Method called after parsing (but before returning) end element,
 * to allow for pluggable validators to verify correctness of
 * the content model for the closing element.
 *
 * @return Validation state that should be effective for the parent
 *   element state
 */
public int validateEndElement()
  throws XMLStreamException
{
  if (mValidator == null) { // should never be null if we get here
    return XMLValidator.CONTENT_ALLOW_ANY_TEXT;
  }
  int result =  mValidator.validateElementEnd
    (mCurrElement.mLocalName, mCurrElement.mNamespaceURI, mCurrElement.mPrefix);
  if (mDepth == 1) { // root closing
    mValidator.validationCompleted(true);
  }
  return result;
}

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

/**
 * Method called after parsing (but before returning) end element,
 * to allow for pluggable validators to verify correctness of
 * the content model for the closing element.
 *
 * @return Validation state that should be effective for the parent
 *   element state
 */
public int validateEndElement()
  throws XMLStreamException
{
  if (mValidator == null) { // should never be null if we get here
    return XMLValidator.CONTENT_ALLOW_ANY_TEXT;
  }
  int result =  mValidator.validateElementEnd
    (mCurrElement.mLocalName, mCurrElement.mNamespaceURI, mCurrElement.mPrefix);
  if (mDepth == 1) { // root closing
    mValidator.validationCompleted(true);
  }
  return result;
}

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

/**
 * Method called after parsing (but before returning) end element,
 * to allow for pluggable validators to verify correctness of
 * the content model for the closing element.
 *
 * @return Validation state that should be effective for the parent
 *   element state
 */
public int validateEndElement()
  throws XMLStreamException
{
  if (mValidator == null) { // should never be null if we get here
    return XMLValidator.CONTENT_ALLOW_ANY_TEXT;
  }
  int result =  mValidator.validateElementEnd
    (mCurrElement.mLocalName, mCurrElement.mNamespaceURI, mCurrElement.mPrefix);
  if (mDepth == 1) { // root closing
    mValidator.validationCompleted(true);
  }
  return result;
}

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

/**
 * Method called after parsing (but before returning) end element,
 * to allow for pluggable validators to verify correctness of
 * the content model for the closing element.
 *
 * @return Validation state that should be effective for the parent
 *   element state
 */
public int validateEndElement()
  throws XMLStreamException
{
  if (mValidator == null) { // should never be null if we get here
    return XMLValidator.CONTENT_ALLOW_ANY_TEXT;
  }
  int result =  mValidator.validateElementEnd
    (mCurrElement.mLocalName, mCurrElement.mNamespaceURI, mCurrElement.mPrefix);
  if (mDepth == 1) { // root closing
    mValidator.validationCompleted(true);
  }
  return result;
}

代码示例来源:origin: woodstox/wstx-asl

mVldContent = mValidator.validateElementEnd(localName, NO_NS_URI, NO_PREFIX);

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

mVldContent = mValidator.validateElementEnd(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox

mVldContent = mValidator.validateElementEnd(localName, NO_NS_URI, NO_PREFIX);

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

mVldContent = mValidator.validateElementEnd(localName, XmlConsts.ELEM_NO_NS_URI, XmlConsts.ELEM_NO_PREFIX);

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