XmlNamedNodeMap.RemoveNamedItem XmlNamedNodeMap.RemoveNamedItem XmlNamedNodeMap.RemoveNamedItem XmlNamedNodeMap.RemoveNamedItem Method

정의

XmlNamedNodeMap에서 지정된 노드를 제거합니다.Removes the specified node from the XmlNamedNodeMap.

오버로드

RemoveNamedItem(String) RemoveNamedItem(String) RemoveNamedItem(String) RemoveNamedItem(String)

XmlNamedNodeMap에서 노드를 제거합니다.Removes the node from the XmlNamedNodeMap.

RemoveNamedItem(String, String) RemoveNamedItem(String, String) RemoveNamedItem(String, String) RemoveNamedItem(String, String)

일치하는 LocalNameNamespaceURI를 갖고 있는 노드를 제거합니다.Removes a node with the matching LocalName and NamespaceURI.

RemoveNamedItem(String) RemoveNamedItem(String) RemoveNamedItem(String) RemoveNamedItem(String)

XmlNamedNodeMap에서 노드를 제거합니다.Removes the node from the XmlNamedNodeMap.

public:
 virtual System::Xml::XmlNode ^ RemoveNamedItem(System::String ^ name);
public virtual System.Xml.XmlNode RemoveNamedItem (string name);
abstract member RemoveNamedItem : string -> System.Xml.XmlNode
override this.RemoveNamedItem : string -> System.Xml.XmlNode
Public Overridable Function RemoveNamedItem (name As String) As XmlNode

매개 변수

name
String String String String

제거할 노드의 정규화된 이름입니다.The qualified name of the node to remove. 일치하는 노드의 Name 속성과 이름을 일치시킵니다.The name is matched against the Name property of the matching node.

반환

XmlNode에서 제거한 XmlNamedNodeMap이거나, 일치하는 노드가 없는 경우에는 null입니다.The XmlNode removed from this XmlNamedNodeMap or null if a matching node was not found.

예제

다음 예제에서는 합니다 XmlAttributeCollection 클래스 (에서 상속 하는 XmlNamedNodeMap) 특성을 제거 합니다.The following example uses the XmlAttributeCollection class (which inherits from XmlNamedNodeMap) to remove an attribute.

#using <System.Xml.dll>

using namespace System;
using namespace System::IO;
using namespace System::Xml;
int main()
{
   XmlDocument^ doc = gcnew XmlDocument;
   doc->LoadXml( "<book genre='novel' publicationdate='1997'>   <title>Pride And Prejudice</title></book>" );
   XmlAttributeCollection^ attrColl = doc->DocumentElement->Attributes;
   
   // Remove the publicationdate attribute.
   attrColl->RemoveNamedItem( "publicationdate" );
   Console::WriteLine( "Display the modified XML..." );
   Console::WriteLine( doc->OuterXml );
}

using System;
using System.IO;
using System.Xml;

public class Sample
{
  public static void Main()
  {
     XmlDocument doc = new XmlDocument();
     doc.LoadXml("<book genre='novel' publicationdate='1997'> " +
                 "  <title>Pride And Prejudice</title>" +
                 "</book>");      
 
     XmlAttributeCollection attrColl = doc.DocumentElement.Attributes;

     // Remove the publicationdate attribute.
     attrColl.RemoveNamedItem("publicationdate");

     Console.WriteLine("Display the modified XML...");
     Console.WriteLine(doc.OuterXml);
    
  }
}
Imports System.IO
Imports System.Xml

public class Sample

  public shared sub Main()

    Dim doc as XmlDocument = new XmlDocument()
    doc.LoadXml("<book genre='novel' publicationdate='1997'> " & _
                "  <title>Pride And Prejudice</title>" & _
                "</book>")
                         
    Dim attrColl as XmlAttributeCollection = doc.DocumentElement.Attributes

    ' Remove the publicationdate attribute.
    attrColl.RemoveNamedItem("publicationdate")

    Console.WriteLine("Display the modified XML...")
    Console.WriteLine(doc.OuterXml)
    
  end sub
end class

RemoveNamedItem(String, String) RemoveNamedItem(String, String) RemoveNamedItem(String, String) RemoveNamedItem(String, String)

일치하는 LocalNameNamespaceURI를 갖고 있는 노드를 제거합니다.Removes a node with the matching LocalName and NamespaceURI.

public:
 virtual System::Xml::XmlNode ^ RemoveNamedItem(System::String ^ localName, System::String ^ namespaceURI);
public virtual System.Xml.XmlNode RemoveNamedItem (string localName, string namespaceURI);
abstract member RemoveNamedItem : string * string -> System.Xml.XmlNode
override this.RemoveNamedItem : string * string -> System.Xml.XmlNode
Public Overridable Function RemoveNamedItem (localName As String, namespaceURI As String) As XmlNode

매개 변수

localName
String String String String

제거할 노드의 로컬 이름입니다.The local name of the node to remove.

namespaceURI
String String String String

제거할 노드의 네임스페이스 URI입니다.The namespace URI of the node to remove.

반환

제거한 XmlNode이거나, 일치하는 노드가 없는 경우에는 null입니다.The XmlNode removed or null if a matching node was not found.

적용 대상