当前位置: 首页>>代码示例>>Java>>正文


Java CDATASection.appendData方法代码示例

本文整理汇总了Java中org.w3c.dom.CDATASection.appendData方法的典型用法代码示例。如果您正苦于以下问题:Java CDATASection.appendData方法的具体用法?Java CDATASection.appendData怎么用?Java CDATASection.appendData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.w3c.dom.CDATASection的用法示例。


在下文中一共展示了CDATASection.appendData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: cdata

import org.w3c.dom.CDATASection; //导入方法依赖的package包/类
/**
 * Receive notification of cdata.
 *
 * <p>The Parser will call this method to report each chunk of
 * character data.  SAX parsers may return all contiguous character
 * data in a single chunk, or they may split it into several
 * chunks; however, all of the characters in any single event
 * must come from the same external entity, so that the Locator
 * provides useful information.</p>
 *
 * <p>The application must not attempt to read from the array
 * outside of the specified range.</p>
 *
 * <p>Note that some parsers will report whitespace using the
 * ignorableWhitespace() method rather than this one (validating
 * parsers must do so).</p>
 *
 * @param ch The characters from the XML document.
 * @param start The start position in the array.
 * @param length The number of characters to read from the array.
 * @see #ignorableWhitespace
 * @see org.xml.sax.Locator
 */
public void cdata(char ch[], int start, int length) throws org.xml.sax.SAXException
{
  if(isOutsideDocElem()
     && com.sun.org.apache.xml.internal.utils.XMLCharacterRecognizer.isWhiteSpace(ch, start, length))
    return;  // avoid DOM006 Hierarchy request error

  String s = new String(ch, start, length);

  CDATASection section  =(CDATASection) m_currentNode.getLastChild();
  section.appendData(s);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:35,代码来源:DOMBuilder.java

示例2: cdata

import org.w3c.dom.CDATASection; //导入方法依赖的package包/类
/**
 * Receive notification of cdata.
 *
 * <p>The Parser will call this method to report each chunk of
 * character data.  SAX parsers may return all contiguous character
 * data in a single chunk, or they may split it into several
 * chunks; however, all of the characters in any single event
 * must come from the same external entity, so that the Locator
 * provides useful information.</p>
 *
 * <p>The application must not attempt to read from the array
 * outside of the specified range.</p>
 *
 * <p>Note that some parsers will report whitespace using the
 * ignorableWhitespace() method rather than this one (validating
 * parsers must do so).</p>
 *
 * @param ch The characters from the XML document.
 * @param start The start position in the array.
 * @param length The number of characters to read from the array.
 * @see #ignorableWhitespace
 * @see org.xml.sax.Locator
 */
public void cdata(char ch[], int start, int length) throws org.xml.sax.SAXException
{
  if(isOutsideDocElem()
     && org.apache.xml.utils.XMLCharacterRecognizer.isWhiteSpace(ch, start, length))
    return;  // avoid DOM006 Hierarchy request error

  String s = new String(ch, start, length);

  CDATASection section  =(CDATASection) m_currentNode.getLastChild();
  section.appendData(s);
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:35,代码来源:DOMBuilder.java


注:本文中的org.w3c.dom.CDATASection.appendData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。