SecurityElement.Attributes 속성

정의

XML 요소의 특성을 이름/값 쌍으로 가져오거나 설정합니다.

public:
 property System::Collections::Hashtable ^ Attributes { System::Collections::Hashtable ^ get(); void set(System::Collections::Hashtable ^ value); };
public System.Collections.Hashtable? Attributes { get; set; }
public System.Collections.Hashtable Attributes { get; set; }
member this.Attributes : System.Collections.Hashtable with get, set
Public Property Attributes As Hashtable

속성 값

Hashtable

XML 요소의 특성 값에 대한 Hashtable 개체입니다.

예외

Hashtable 개체의 이름 또는 값이 잘못된 경우

이름이 유효한 XML 특성 이름이 아닙니다.

예제

다음 코드에서는 속성을 사용하여 Attributes XML 요소의 특성을 얻는 방법을 보여줍니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 SecurityElement 클래스입니다.

Hashtable^ attributeKeys = xmlElement->Attributes;
String^ attributeValue = attributeKeys[ attributeName ]->ToString();
Hashtable attributeKeys = xmlElement.Attributes;
string attributeValue = attributeKeys[attributeName].ToString();
Dim attributeKeys As Hashtable = xmlElement.Attributes
Dim attributeValue As String = attributeKeys(attributeName).ToString()

설명

각 특성은 Hashtable 이름/값 쌍으로 에 저장됩니다.

특성의 이름 및 값은 유효한 XML 특성 문자만 포함해야 합니다. Escape문자열에서 잘못된 문자를 제거하려면 를 사용합니다.

따옴표로 묶은 문자열은 지원되지 않으므로 이름/값 쌍의 문자열에는 따옴표 또는 따옴표가 필요한 다른 문자가 포함되지 않아야 합니다.

적용 대상