gpt4 book ai didi

org.apache.xmlbeans.impl.values.XmlObjectBase.newCursor()方法的使用及代码示例

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

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

XmlObjectBase.newCursor介绍

暂无

代码示例

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

/**
 * True if the object is at the root of the document.
 */
private boolean isRootXmlObject()
{
  XmlCursor cur = newCursor();
  if (cur == null)
    return false;
  boolean result = !cur.toParent();
  cur.dispose();
  return result;
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

/**
 * Gets the root XmlObject for this document.
 */
private XmlObject getRootXmlObject()
{
  XmlCursor cur = newCursor();
  if (cur == null)
    return this;
  cur.toStartDoc();
  XmlObject result = cur.getObject();
  cur.dispose();
  return result;
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

/**
 * Selects the contents of the children elements with the given name.
 */
public XmlObject[] selectChildren(QName elementName)
{
  XmlCursor xc = this.newCursor();
  try
  {
    if (!xc.isContainer())
      return EMPTY_RESULT;
    List result = new ArrayList();
    if (xc.toChild(elementName))
    {
      // look for elements
      do
      {
        result.add(xc.getObject());
      }
      while (xc.toNextSibling(elementName));
    }
    if (result.size() == 0)
      return EMPTY_RESULT;
    else
      return (XmlObject[]) result.toArray(EMPTY_RESULT);
  }
  finally
  {
    xc.dispose();
  }
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

throw new IllegalArgumentException();
XmlCursor xc = this.newCursor();
try

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

throw new IllegalArgumentException();
XmlCursor xc = this.newCursor();
try

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

/**
 * Selects the content of the attribute with the given name.
 */
public XmlObject selectAttribute(QName attributeName)
{
  XmlCursor xc = this.newCursor();
  try
  {
    if (!xc.isContainer())
      return null;
    if (xc.toFirstAttribute())
    {
      //look for attributes
      do
      {
        if (xc.getName().equals(attributeName))
        {
          return xc.getObject();
        }
      }
      while (xc.toNextAttribute());
    }
    return null;
  }
  finally
  {
    xc.dispose();
  }
}

代码示例来源:origin: org.apache.xmlbeans/xmlbeans

XmlCursor c = newCursor();

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

/**
 * True if the object is at the root of the document.
 */
private boolean isRootXmlObject()
{
  XmlCursor cur = newCursor();
  if (cur == null)
    return false;
  boolean result = !cur.toParent();
  cur.dispose();
  return result;
}

代码示例来源:origin: com.github.pjfanning/xmlbeans

/**
 * True if the object is at the root of the document.
 */
private boolean isRootXmlObject()
{
  XmlCursor cur = newCursor();
  if (cur == null)
    return false;
  boolean result = !cur.toParent();
  cur.dispose();
  return result;
}

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

/**
 * Gets the root XmlObject for this document.
 */
private XmlObject getRootXmlObject()
{
  XmlCursor cur = newCursor();
  if (cur == null)
    return this;
  cur.toStartDoc();
  XmlObject result = cur.getObject();
  cur.dispose();
  return result;
}

代码示例来源:origin: com.github.pjfanning/xmlbeans

/**
 * Gets the root XmlObject for this document.
 */
private XmlObject getRootXmlObject()
{
  XmlCursor cur = newCursor();
  if (cur == null)
    return this;
  cur.toStartDoc();
  XmlObject result = cur.getObject();
  cur.dispose();
  return result;
}

代码示例来源:origin: com.github.pjfanning/xmlbeans

/**
 * Selects the contents of the children elements with the given name.
 */
public XmlObject[] selectChildren(QName elementName)
{
  XmlCursor xc = this.newCursor();
  try
  {
    if (!xc.isContainer())
      return EMPTY_RESULT;
    List result = new ArrayList();
    if (xc.toChild(elementName))
    {
      // look for elements
      do
      {
        result.add(xc.getObject());
      }
      while (xc.toNextSibling(elementName));
    }
    if (result.size() == 0)
      return EMPTY_RESULT;
    else
      return (XmlObject[]) result.toArray(EMPTY_RESULT);
  }
  finally
  {
    xc.dispose();
  }
}

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

/**
 * Selects the contents of the children elements with the given name.
 */
public XmlObject[] selectChildren(QName elementName)
{
  XmlCursor xc = this.newCursor();
  try
  {
    if (!xc.isContainer())
      return EMPTY_RESULT;
    List result = new ArrayList();
    if (xc.toChild(elementName))
    {
      // look for elements
      do
      {
        result.add(xc.getObject());
      }
      while (xc.toNextSibling(elementName));
    }
    if (result.size() == 0)
      return EMPTY_RESULT;
    else
      return (XmlObject[]) result.toArray(EMPTY_RESULT);
  }
  finally
  {
    xc.dispose();
  }
}

代码示例来源:origin: com.github.pjfanning/xmlbeans

throw new IllegalArgumentException();
XmlCursor xc = this.newCursor();
try

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

throw new IllegalArgumentException();
XmlCursor xc = this.newCursor();
try

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

throw new IllegalArgumentException();
XmlCursor xc = this.newCursor();
try

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

/**
 * Selects the content of the attribute with the given name.
 */
public XmlObject selectAttribute(QName attributeName)
{
  XmlCursor xc = this.newCursor();
  try
  {
    if (!xc.isContainer())
      return null;
    if (xc.toFirstAttribute())
    {
      //look for attributes
      do
      {
        if (xc.getName().equals(attributeName))
        {
          return xc.getObject();
        }
      }
      while (xc.toNextAttribute());
    }
    return null;
  }
  finally
  {
    xc.dispose();
  }
}

代码示例来源:origin: com.github.pjfanning/xmlbeans

/**
 * Selects the content of the attribute with the given name.
 */
public XmlObject selectAttribute(QName attributeName)
{
  XmlCursor xc = this.newCursor();
  try
  {
    if (!xc.isContainer())
      return null;
    if (xc.toFirstAttribute())
    {
      //look for attributes
      do
      {
        if (xc.getName().equals(attributeName))
        {
          return xc.getObject();
        }
      }
      while (xc.toNextAttribute());
    }
    return null;
  }
  finally
  {
    xc.dispose();
  }
}

代码示例来源:origin: com.github.pjfanning/xmlbeans

XmlCursor c = newCursor();

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

XmlCursor c = newCursor();

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