Here you can find the source of removeAttribute(Node iNode, String iAttributeName)
Parameter | Description |
---|---|
iNode | The node whose attribute is to be removed |
iAttributeName | The name of the attribute to be removed |
public static void removeAttribute(Node iNode, String iAttributeName)
//package com.java2s; /******************************************************************************* ADL SCORM 2004 4th Edition Sample Run-Time Environment The ADL SCORM 2004 4th Ed. Sample Run-Time Environment is licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States. The Advanced Distributed Learning Initiative allows you to: * Share - to copy, distribute and transmit the work. * Remix - to adapt the work. //from w w w . j av a 2 s .co m Under the following conditions: * Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). * Noncommercial. You may not use this work for commercial purposes. * Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one. For any reuse or distribution, you must make clear to others the license terms of this work. Any of the above conditions can be waived if you get permission from the ADL Initiative. Nothing in this license impairs or restricts the author's moral rights. *******************************************************************************/ import org.w3c.dom.Node; import org.w3c.dom.NamedNodeMap; public class Main { /** * This method removes the specified attribute from the specified node * * @param iNode The node whose attribute is to be removed * @param iAttributeName The name of the attribute to be removed */ public static void removeAttribute(Node iNode, String iAttributeName) { NamedNodeMap attrList = iNode.getAttributes(); attrList.removeNamedItem(iAttributeName); } }