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


Java DOMException.getMessage方法代码示例

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


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

示例1: endElement

import org.w3c.dom.DOMException; //导入方法依赖的package包/类
/**
 * Checks whether control needs to be returned to Digester.
 * 
 * @param namespaceURI the namespace URI
 * @param localName the local name
 * @param qName the qualified (prefixed) name
 * @throws SAXException if the DOM implementation throws an exception
 */
@Override
public void endElement(String namespaceURI, String localName,
                       String qName)
    throws SAXException {
    
    try {
        if (depth == 0) {
            getDigester().getXMLReader().setContentHandler(
                oldContentHandler);
            getDigester().push(root);
            getDigester().endElement(namespaceURI, localName, qName);
        }
    
        top = top.getParentNode();
        depth--;
    } catch (DOMException e) {
        throw new SAXException(e.getMessage(), e);
    }

}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:29,代码来源:NodeCreateRule.java

示例2: endElement

import org.w3c.dom.DOMException; //导入方法依赖的package包/类
/**
 * Checks whether control needs to be returned to Digester.
 * 
 * @param namespaceURI the namespace URI
 * @param localName the local name
 * @param qName the qualified (prefixed) name
 * @throws SAXException if the DOM implementation throws an exception
 */
public void endElement(String namespaceURI, String localName,
                       String qName)
    throws SAXException {
    
    try {
        if (depth == 0) {
            getDigester().getXMLReader().setContentHandler(
                oldContentHandler);
            getDigester().push(root);
            getDigester().endElement(namespaceURI, localName, qName);
        }
    
        top = top.getParentNode();
        depth--;
    } catch (DOMException e) {
        throw new SAXException(e.getMessage());
    }

}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:28,代码来源:NodeCreateRule.java

示例3: endElement

import org.w3c.dom.DOMException; //导入方法依赖的package包/类
/**
 * Checks whether control needs to be returned to Digester.
 * 
 * @param namespaceURI
 *            the namespace URI
 * @param localName
 *            the local name
 * @param qName
 *            the qualified (prefixed) name
 * @throws SAXException
 *             if the DOM implementation throws an exception
 */
@Override
public void endElement(String namespaceURI, String localName, String qName) throws SAXException {

	try {
		if (depth == 0) {
			getDigester().getXMLReader().setContentHandler(oldContentHandler);
			getDigester().push(root);
			getDigester().endElement(namespaceURI, localName, qName);
		}

		top = top.getParentNode();
		depth--;
	} catch (DOMException e) {
		throw new SAXException(e.getMessage(), e);
	}

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:30,代码来源:NodeCreateRule.java

示例4: characters

import org.w3c.dom.DOMException; //导入方法依赖的package包/类
/**
 * Appends a {@link org.w3c.dom.Text Text} node to the current node.
 * 
 * @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
 * @throws SAXException if the DOM implementation throws an exception
 */
@Override
public void characters(char[] ch, int start, int length)
    throws SAXException {

    try {
        String str = new String(ch, start, length);
        if (str.trim().length() > 0) { 
            top.appendChild(doc.createTextNode(str));
        }
    } catch (DOMException e) {
        throw new SAXException(e.getMessage(), e);
    }

}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:23,代码来源:NodeCreateRule.java

示例5: processingInstruction

import org.w3c.dom.DOMException; //导入方法依赖的package包/类
/**
 * Adds a new
 * {@link org.w3c.dom.ProcessingInstruction ProcessingInstruction} to 
 * the current node.
 * 
 * @param target the processing instruction target
 * @param data the processing instruction data, or null if none was 
 *   supplied
 * @throws SAXException if the DOM implementation throws an exception
 */
@Override
public void processingInstruction(String target, String data)
    throws SAXException {
    
    try {
        top.appendChild(doc.createProcessingInstruction(target, data));
    } catch (DOMException e) {
        throw new SAXException(e.getMessage(), e);
    }

}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:22,代码来源:NodeCreateRule.java

示例6: startElement

import org.w3c.dom.DOMException; //导入方法依赖的package包/类
/**
 * Adds a new child {@link org.w3c.dom.Element Element} to the current
 * node.
 * 
 * @param namespaceURI the namespace URI
 * @param localName the local name
 * @param qName the qualified (prefixed) name
 * @param atts the list of attributes
 * @throws SAXException if the DOM implementation throws an exception
 */
@Override
public void startElement(String namespaceURI, String localName,
                         String qName, Attributes atts)
    throws SAXException {

    try {
        Node previousTop = top;
        if ((localName == null) || (localName.length() == 0)) { 
            top = doc.createElement(qName);
        } else {
            top = doc.createElementNS(namespaceURI, localName);
        }
        for (int i = 0; i < atts.getLength(); i++) {
            Attr attr = null;
            if ((atts.getLocalName(i) == null) ||
                (atts.getLocalName(i).length() == 0)) {
                attr = doc.createAttribute(atts.getQName(i));
                attr.setNodeValue(atts.getValue(i));
                ((Element)top).setAttributeNode(attr);
            } else {
                attr = doc.createAttributeNS(atts.getURI(i),
                                             atts.getLocalName(i));
                attr.setNodeValue(atts.getValue(i));
                ((Element)top).setAttributeNodeNS(attr);
            }
        }
        previousTop.appendChild(top);
        depth++;
    } catch (DOMException e) {
        throw new SAXException(e.getMessage(), e);
    }

}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:44,代码来源:NodeCreateRule.java

示例7: characters

import org.w3c.dom.DOMException; //导入方法依赖的package包/类
/**
 * Appends a {@link org.w3c.dom.Text Text} node to the current node.
 * 
 * @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
 * @throws SAXException if the DOM implementation throws an exception
 */
public void characters(char[] ch, int start, int length)
    throws SAXException {

    try {
        String str = new String(ch, start, length);
        if (str.trim().length() > 0) { 
            top.appendChild(doc.createTextNode(str));
        }
    } catch (DOMException e) {
        throw new SAXException(e.getMessage());
    }

}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:22,代码来源:NodeCreateRule.java

示例8: processingInstruction

import org.w3c.dom.DOMException; //导入方法依赖的package包/类
/**
 * Adds a new
 * {@link org.w3c.dom.ProcessingInstruction ProcessingInstruction} to 
 * the current node.
 * 
 * @param target the processing instruction target
 * @param data the processing instruction data, or null if none was 
 *   supplied
 * @throws SAXException if the DOM implementation throws an exception
 */
public void processingInstruction(String target, String data)
    throws SAXException {
    
    try {
        top.appendChild(doc.createProcessingInstruction(target, data));
    } catch (DOMException e) {
        throw new SAXException(e.getMessage());
    }

}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:21,代码来源:NodeCreateRule.java

示例9: startElement

import org.w3c.dom.DOMException; //导入方法依赖的package包/类
/**
 * Adds a new child {@link org.w3c.dom.Element Element} to the current
 * node.
 * 
 * @param namespaceURI the namespace URI
 * @param localName the local name
 * @param qName the qualified (prefixed) name
 * @param atts the list of attributes
 * @throws SAXException if the DOM implementation throws an exception
 */
public void startElement(String namespaceURI, String localName,
                         String qName, Attributes atts)
    throws SAXException {

    try {
        Node previousTop = top;
        if ((localName == null) || (localName.length() == 0)) { 
            top = doc.createElement(qName);
        } else {
            top = doc.createElementNS(namespaceURI, localName);
        }
        for (int i = 0; i < atts.getLength(); i++) {
            Attr attr = null;
            if ((atts.getLocalName(i) == null) ||
                (atts.getLocalName(i).length() == 0)) {
                attr = doc.createAttribute(atts.getQName(i));
                attr.setNodeValue(atts.getValue(i));
                ((Element)top).setAttributeNode(attr);
            } else {
                attr = doc.createAttributeNS(atts.getURI(i),
                                             atts.getLocalName(i));
                attr.setNodeValue(atts.getValue(i));
                ((Element)top).setAttributeNodeNS(attr);
            }
        }
        previousTop.appendChild(top);
        depth++;
    } catch (DOMException e) {
        throw new SAXException(e.getMessage());
    }

}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:43,代码来源:NodeCreateRule.java

示例10: characters

import org.w3c.dom.DOMException; //导入方法依赖的package包/类
/**
 * Appends a {@link org.w3c.dom.Text Text} node to the current node.
 * 
 * @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
 * @throws SAXException
 *             if the DOM implementation throws an exception
 */
@Override
public void characters(char[] ch, int start, int length) throws SAXException {

	try {
		String str = new String(ch, start, length);
		if (str.trim().length() > 0) {
			top.appendChild(doc.createTextNode(str));
		}
	} catch (DOMException e) {
		throw new SAXException(e.getMessage(), e);
	}

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:26,代码来源:NodeCreateRule.java

示例11: startElement

import org.w3c.dom.DOMException; //导入方法依赖的package包/类
/**
 * Adds a new child {@link org.w3c.dom.Element Element} to the current
 * node.
 * 
 * @param namespaceURI
 *            the namespace URI
 * @param localName
 *            the local name
 * @param qName
 *            the qualified (prefixed) name
 * @param atts
 *            the list of attributes
 * @throws SAXException
 *             if the DOM implementation throws an exception
 */
@Override
public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
		throws SAXException {

	try {
		Node previousTop = top;
		if ((localName == null) || (localName.length() == 0)) {
			top = doc.createElement(qName);
		} else {
			top = doc.createElementNS(namespaceURI, localName);
		}
		for (int i = 0; i < atts.getLength(); i++) {
			Attr attr = null;
			if ((atts.getLocalName(i) == null) || (atts.getLocalName(i).length() == 0)) {
				attr = doc.createAttribute(atts.getQName(i));
				attr.setNodeValue(atts.getValue(i));
				((Element) top).setAttributeNode(attr);
			} else {
				attr = doc.createAttributeNS(atts.getURI(i), atts.getLocalName(i));
				attr.setNodeValue(atts.getValue(i));
				((Element) top).setAttributeNodeNS(attr);
			}
		}
		previousTop.appendChild(top);
		depth++;
	} catch (DOMException e) {
		throw new SAXException(e.getMessage(), e);
	}

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:46,代码来源:NodeCreateRule.java

示例12: processingInstruction

import org.w3c.dom.DOMException; //导入方法依赖的package包/类
/**
 * Adds a new {@link org.w3c.dom.ProcessingInstruction
 * ProcessingInstruction} to the current node.
 * 
 * @param target
 *            the processing instruction target
 * @param data
 *            the processing instruction data, or null if none was
 *            supplied
 * @throws SAXException
 *             if the DOM implementation throws an exception
 */
@Override
public void processingInstruction(String target, String data) throws SAXException {

	try {
		top.appendChild(doc.createProcessingInstruction(target, data));
	} catch (DOMException e) {
		throw new SAXException(e.getMessage(), e);
	}

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:23,代码来源:NodeCreateRule.java


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