gpt4 book ai didi

org.apache.wicket.markup.parser.XmlPullParser.next()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 15:08:40 26 4
gpt4 key购买 nike

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

XmlPullParser.next介绍

暂无

代码示例

代码示例来源:origin: apache/wicket

/**
 * @return The next XML tag
 * @throws ParseException
 */
public final XmlTag nextTag() throws ParseException
{
  while (next() != HttpTagType.NOT_INITIALIZED)
  {
    switch (lastType)
    {
      case TAG :
        return lastTag;
      case BODY :
        break;
      case COMMENT :
        break;
      case CONDITIONAL_COMMENT :
        break;
      case CDATA :
        break;
      case PROCESSING_INSTRUCTION :
        break;
      case SPECIAL_TAG :
        break;
    }
  }
  return null;
}

代码示例来源:origin: org.apache.wicket/wicket-core

/**
 * This method tries to parse the last response to return the encoded base URL and will throw an
 * exception if there none was encoded.
 *
 * @return Wicket-Ajax-BaseURL set on last response by {@link AbstractDefaultAjaxBehavior}
 * @throws IOException
 * @throws ResourceStreamNotFoundException
 * @throws ParseException
 */
public String getWicketAjaxBaseUrlEncodedInLastResponse() throws IOException,
  ResourceStreamNotFoundException, ParseException
{
  XmlPullParser parser = new XmlPullParser();
  parser.parse(getLastResponseAsString());
  XmlTag tag;
  while ((tag = parser.nextTag()) != null)
  {
    if (tag.isOpen() && tag.getName().equals("script") &&
      "wicket-ajax-base-url".equals(tag.getAttribute("id")))
    {
      parser.next();
      return parser.getString().toString().split("\\\"")[1];
    }
  }
  fail("Last response has no AJAX base URL set by AbstractDefaultAjaxBehavior.");
  return null;
}

代码示例来源:origin: apache/wicket

/**
 * This method tries to parse the last response to return the encoded base URL and will throw an
 * exception if there none was encoded.
 *
 * @return Wicket-Ajax-BaseURL set on last response by {@link AbstractDefaultAjaxBehavior}
 * @throws IOException
 * @throws ParseException
 */
public String getWicketAjaxBaseUrlEncodedInLastResponse()
  throws IOException, ParseException
{
  XmlPullParser parser = new XmlPullParser();
  parser.parse(getLastResponseAsString());
  XmlTag tag;
  while ((tag = parser.nextTag()) != null)
  {
    if (tag.isOpen() && tag.getName().equals("script") &&
      "wicket-ajax-base-url".equals(tag.getAttribute("id")))
    {
      parser.next();
      return parser.getString().toString().split("\\\"")[1];
    }
  }
  fail("Last response has no AJAX base URL set by AbstractDefaultAjaxBehavior.");
  return null;
}

代码示例来源:origin: org.apache.wicket/wicket-core

/**
 * @return The next XML tag
 * @throws ParseException
 */
public final XmlTag nextTag() throws ParseException
{
  while (next() != HttpTagType.NOT_INITIALIZED)
  {
    switch (lastType)
    {
      case TAG :
        return lastTag;
      case BODY :
        break;
      case COMMENT :
        break;
      case CONDITIONAL_COMMENT :
        break;
      case CDATA :
        break;
      case PROCESSING_INSTRUCTION :
        break;
      case SPECIAL_TAG :
        break;
    }
  }
  return null;
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Gets the next tag from the input string.
 * 
 * @return The extracted tag (will always be of type XmlTag).
 * @throws ParseException
 */
public final MarkupElement nextTag() throws ParseException
{
  while (next())
  {
    switch (lastType)
    {
      case TAG :
        return lastTag;
      case BODY :
        break;
      case COMMENT :
        break;
      case CDATA :
        break;
      case PROCESSING_INSTRUCTION :
        break;
      case SPECIAL_TAG :
        break;
    }
  }
  return null;
}

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

/**
 * Gets the next tag from the input string.
 * 
 * @return The extracted tag (will always be of type XmlTag).
 * @throws ParseException
 */
public final MarkupElement nextTag() throws ParseException
{
  while (next())
  {
    switch (lastType)
    {
      case TAG :
        return lastTag;
      case BODY :
        break;
      case COMMENT :
        break;
      case CDATA :
        break;
      case PROCESSING_INSTRUCTION :
        break;
      case SPECIAL_TAG :
        break;
    }
  }
  return null;
}

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