XElement 생성자

정의

XElement 클래스의 새 인스턴스를 초기화합니다.

오버로드

Name Description
XElement(XElement)

다른 XElement 개체에서 클래스의 새 인스턴스를 XElement 초기화합니다.

XElement(XName)

지정된 이름을 사용하여 클래스의 XElement 새 인스턴스를 초기화합니다.

XElement(XStreamingElement)

개체에서 클래스의 새 인스턴스를 XElementXStreamingElement 초기화합니다.

XElement(XName, Object)

지정된 이름과 콘텐츠를 사용하여 클래스의 XElement 새 인스턴스를 초기화합니다.

XElement(XName, Object[])

지정된 이름과 콘텐츠를 사용하여 클래스의 XElement 새 인스턴스를 초기화합니다.

예제

다음 예제에서는 XML 트리를 만듭니다. 새 요소의 콘텐츠는 LINQ 쿼리에서 제공됩니다.

XElement xmlTree1 = new XElement("Root",
    new XElement("Child", 1),
    new XElement("Child", 2),
    new XElement("Child", 3),
    new XElement("Child", 4),
    new XElement("Child", 5),
    new XElement("Child", 6)
);

XElement xmlTree2 = new XElement("Root",
    from el in xmlTree1.Elements()
    where((int)el >= 3 && (int)el <= 5)
    select el
);
Console.WriteLine(xmlTree2);
Dim xmlTree1 As XElement = _
        <Root>
            <Child>1</Child>
            <Child>2</Child>
            <Child>3</Child>
            <Child>4</Child>
            <Child>5</Child>
            <Child>6</Child>
        </Root>

Dim xmlTree2 As XElement = _
    <Root>
        <%= From el In xmlTree1.Elements() _
            Where el.Value >= 3 And el.Value <= 5 _
            Select el %>
    </Root>

Console.WriteLine(xmlTree2)

이 예제는 다음과 같은 출력을 생성합니다.

<Root>
  <Child>3</Child>
  <Child>4</Child>
  <Child>5</Child>
</Root>

설명

이 생성자에 전달할 수 있는 유효한 콘텐츠에 대한 자세한 내용은 XElement 및 XDocument 개체의 유효한 콘텐츠를 참조하세요.

문자열에서 .로의 암시적 변환이 있습니다 XName. 이 생성자의 일반적인 사용은 새 XName문자열을 만드는 대신 매개 변수로 문자열을 지정하는 것입니다.

네임스페이스에서 요소를 만들 때 일반적으로는 문자열과 함께 XNamespace 더하기 연산자 오버로드를 사용하여 만듭니다 XName. 자세한 내용은 XML 네임스페이스 작업을 참조하세요.

XElement(XElement)

Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs

다른 XElement 개체에서 클래스의 새 인스턴스를 XElement 초기화합니다.

public:
 XElement(System::Xml::Linq::XElement ^ other);
public XElement(System.Xml.Linq.XElement other);
new System.Xml.Linq.XElement : System.Xml.Linq.XElement -> System.Xml.Linq.XElement
Public Sub New (other As XElement)

매개 변수

other
XElement

XElement 복사할 개체입니다.

예제

다음 예제에서는 XML 트리를 만들고 트리의 복제본을 만든 다음 DeepEquals호출하여 두 XML 트리가 같은지 여부를 테스트합니다.

XElement xmlTree = new XElement("Root",
    new XAttribute("Att1", 1),
    new XElement("Child1", 1),
    new XElement("Child2", 2)
);

// Create a clone of the tree.
XElement treeClone = new XElement(xmlTree);

Console.WriteLine("xmlTree = treeClone: {0}", XNode.DeepEquals(xmlTree, treeClone));

// Do some work with xmlTree, perhaps pass it to other methods.
xmlTree.Add(new XElement("Child3", 3));

Console.WriteLine("xmlTree = treeClone: {0}", XNode.DeepEquals(xmlTree, treeClone));
Dim xmlTree As XElement = _
        <Root Att1="1">
            <Child1>1</Child1>
            <Child2>2</Child2>
        </Root>

' Create a clone of the tree.
Dim treeClone As XElement = New XElement(xmlTree)

Console.WriteLine("xmlTree = treeClone: {0}", XNode.DeepEquals(xmlTree, treeClone))

' Do some work with xmlTree, perhaps pass it to other methods.
xmlTree.Add(New XElement("Child3", 3))

Console.WriteLine("xmlTree = treeClone: {0}", XNode.DeepEquals(xmlTree, treeClone))

이 예제는 다음과 같은 출력을 생성합니다.

xmlTree = treeClone: True
xmlTree = treeClone: False

설명

이 생성자는 요소의 전체 복사본을 만듭니다.

추가 정보

적용 대상

XElement(XName)

Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs

지정된 이름을 사용하여 클래스의 XElement 새 인스턴스를 초기화합니다.

public:
 XElement(System::Xml::Linq::XName ^ name);
public XElement(System.Xml.Linq.XName name);
new System.Xml.Linq.XElement : System.Xml.Linq.XName -> System.Xml.Linq.XElement
Public Sub New (name As XName)

매개 변수

name
XName

XName 요소의 이름이 들어 있는 항목입니다.

예제

다음 예제에서는 콘텐츠가 없는 요소를 만듭니다.

XElement el = new XElement("Root");
Console.WriteLine(el);
Dim el As XElement = <Root/>
Console.WriteLine(el)

이 예제는 다음과 같은 출력을 생성합니다.

<Root />

다음 예제에서는 콘텐츠가 없는 네임스페이스에 요소를 만듭니다. 자세한 내용은 XML 네임스페이스 작업을 참조하세요.

XNamespace aw = "http://www.adventure-works.com";
XElement root = new XElement(aw + "Root");
Console.WriteLine(root);
Imports <xmlns="http://www.adventure-works.com">

Module Module1
    Sub Main()
        Dim root = <Root/>
        Console.WriteLine(root)
    End Sub
End Module

이 예제는 다음과 같은 출력을 생성합니다.

<Root xmlns="http://www.adventure-works.com" />

설명

이 생성자는 콘텐츠가 없고 특성이 없는 요소를 만듭니다.

문자열에서 .로의 암시적 변환이 있습니다 XName. 이 생성자의 일반적인 사용은 새 XName문자열을 만드는 대신 매개 변수로 문자열을 지정하는 것입니다. 네임스페이스에서 요소를 만들 때 일반적으로는 문자열과 함께 XNamespace 더하기 연산자 오버로드를 사용하여 만듭니다 XName. 자세한 내용은 XML 네임스페이스 작업을 참조하세요.

추가 정보

적용 대상

XElement(XStreamingElement)

Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs

개체에서 클래스의 새 인스턴스를 XElementXStreamingElement 초기화합니다.

public:
 XElement(System::Xml::Linq::XStreamingElement ^ other);
public XElement(System.Xml.Linq.XStreamingElement other);
new System.Xml.Linq.XElement : System.Xml.Linq.XStreamingElement -> System.Xml.Linq.XElement
Public Sub New (other As XStreamingElement)

매개 변수

other
XStreamingElement

XStreamingElementXElement내용에 대해 반복될 평가되지 않은 쿼리를 포함하는 값입니다.

예제

다음 예제에서는 원본 XML 트리를 만든 다음 원본 XML 트리의 쿼리에서 만듭니다 XStreamingElement . 그런 다음 콘솔에 XStreamingElement 직렬화하고 원본 XML 트리에 새 요소를 추가한 다음 다시 직렬화합니다 XStreamingElement . 원본 XML 트리에 새로 추가된 요소가 첫 번째 serialization에 포함되지 않고 두 번째 serialization에 포함되는 것을 볼 수 있습니다.

XElement src = new XElement("Root",
                   new XElement("Child1", 1),
                   new XElement("Child2", 2),
                   new XElement("Child3", 3)
               );
XStreamingElement xse = new XStreamingElement("NewRoot",
                            from el in src.Elements()
                            where (int)el >= 2
                            select el
                        );
Console.WriteLine(xse);
src.Add(new XElement("Child4", 4));
Console.WriteLine("----");
Console.WriteLine(xse);
Dim src As XElement = _
        <Root>
            <Child1>1</Child1>
            <Child2>2</Child2>
            <Child3>3</Child3>
        </Root>
Dim xse As XStreamingElement = New XStreamingElement("NewRoot", _
        From el In src.Elements() _
        Where (CInt(el) >= 2) _
        Select el _
)
Console.WriteLine(xse)
src.Add(New XElement("Child4", 4))
Console.WriteLine("----")
Console.WriteLine(xse)

이 예제는 다음과 같은 출력을 생성합니다.

<NewRoot>
  <Child2>2</Child2>
  <Child3>3</Child3>
</NewRoot>
----
<NewRoot>
  <Child2>2</Child2>
  <Child3>3</Child3>
  <Child4>4</Child4>
</NewRoot>

설명

이 생성자는 지정된 XStreamingElement내용을 반복하고 해당 내용이 포함된 요소를 만듭니다.

추가 정보

적용 대상

XElement(XName, Object)

Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs

지정된 이름과 콘텐츠를 사용하여 클래스의 XElement 새 인스턴스를 초기화합니다.

public:
 XElement(System::Xml::Linq::XName ^ name, System::Object ^ content);
public XElement(System.Xml.Linq.XName name, object content);
public XElement(System.Xml.Linq.XName name, object? content);
new System.Xml.Linq.XElement : System.Xml.Linq.XName * obj -> System.Xml.Linq.XElement
Public Sub New (name As XName, content As Object)

매개 변수

name
XName

XName 요소 이름을 포함하는 항목입니다.

content
Object

요소의 내용입니다.

예제

다음 예제에서는 XML 트리를 만듭니다. 새 요소의 콘텐츠는 LINQ 쿼리에서 제공됩니다.

XElement xmlTree1 = new XElement("Root",
    new XElement("Child1", 1),
    new XElement("Child2", 2),
    new XElement("Child3", 3),
    new XElement("Child4", 4),
    new XElement("Child5", 5),
    new XElement("Child6", 6)
);

XElement xmlTree2 = new XElement("Root",
    from el in xmlTree1.Elements()
    where((int)el >= 3 && (int)el <= 5)
    select el
);
Console.WriteLine(xmlTree2);
Dim xmlTree1 As XElement = _
        <Root>
            <Child1>1</Child1>
            <Child2>2</Child2>
            <Child3>3</Child3>
            <Child4>4</Child4>
            <Child5>5</Child5>
            <Child6>6</Child6>
        </Root>

Dim xmlTree2 As XElement = _
    <Root>
        <%= From el In xmlTree1.Elements() _
            Where el.Value >= 3 And el.Value <= 5 _
            Select el %>
    </Root>

Console.WriteLine(xmlTree2)

이 예제는 다음과 같은 출력을 생성합니다.

<Root>
  <Child3>3</Child3>
  <Child4>4</Child4>
  <Child5>5</Child5>
</Root>

다음 예제에서는 다양한 형식의 콘텐츠를 사용하여 XML 트리를 만듭니다.

XElement root;

// String content:
root = new XElement("Root", "Some text");
Console.WriteLine(root);

// XElement object content:
root = new XElement("Root",
    new XElement("NewChild", "n")
);
Console.WriteLine(root);

// XAttribute object content:
root = new XElement("Root",
    new XAttribute("NewAttribute", "n")
);
Console.WriteLine(root);

// Double content:
double dbl = 12.345;
root = new XElement("Root", dbl);
Console.WriteLine(root);

// DateTime content:
DateTime dt = new DateTime(2006, 10, 6, 12, 30, 00);
root = new XElement("Root", dt);
Console.WriteLine(root);

// String array content:
// Any collection other than a collection of XElement or XAttribute objects
// are converted to strings. The strings are concatenated and added.
string[] stringArray = {
    "abc",
    "def",
    "ghi"
};
root = new XElement("Root", stringArray);
Console.WriteLine(root);

// XElement object array content:
XElement[] ellArray = {
    new XElement("NewChild1", 1),
    new XElement("NewChild2", 2),
    new XElement("NewChild3", 3)
};
root = new XElement("Root", ellArray);
Console.WriteLine(root);

// XAttribute object array content:
XAttribute[] attArray = {
    new XAttribute("NewAtt1", 1),
    new XAttribute("NewAtt2", 2),
    new XAttribute("NewAtt3", 3)
};
root = new XElement("Root", attArray);
Console.WriteLine(root);
Dim root As XElement

' String content:
root = <Root>Some text</Root>
Console.WriteLine(root)

' XElement object content:
root = <Root>
           <NewChild>n</NewChild>
       </Root>
Console.WriteLine(root)

' XAttribute object content:
root = <Root NewAttribute="n"/>
Console.WriteLine(root)

' Double content:
Dim dbl As Double = 12.345
root = <Root><%= dbl %></Root>
Console.WriteLine(root)

' DateTime content:
Dim dt As DateTime = New DateTime(2006, 10, 6, 12, 30, 0)
root = <Root><%= dt %></Root>
Console.WriteLine(root)

' String array content:
' Any collection other than a collection of XElement or XAttribute objects
' are converted to strings. The strings are concatenated and added.

Dim stringArray As String() = { _
    "abc", _
    "def", _
    "ghi" _
}
root = <Root><%= stringArray %></Root>
Console.WriteLine(root)

' XElement object array content:
Dim ellArray As XElement() = { _
    <NewChild1>1</NewChild1>, _
    <NewChild2>2</NewChild2>, _
    <NewChild3>3</NewChild3> _
}

root = <Root><%= ellArray %></Root>
Console.WriteLine(root)

' XAttribute object array content
Dim attArray As XAttribute() = { _
    New XAttribute("NewAtt1", 1), _
    New XAttribute("NewAtt2", 2), _
    New XAttribute("NewAtt3", 3) _
}
root = <Root><%= attArray %></Root>
Console.WriteLine(root)

이 예제는 다음과 같은 출력을 생성합니다.

<Root>Some text</Root>
<Root>
  <NewChild>n</NewChild>
</Root>
<Root NewAttribute="n" />
<Root>12.345</Root>
<Root>2006-10-06T12:30:00</Root>
<Root>abcdefghi</Root>
<Root>
  <NewChild1>1</NewChild1>
  <NewChild2>2</NewChild2>
  <NewChild3>3</NewChild3>
</Root>
<Root NewAtt1="1" NewAtt2="2" NewAtt3="3" />

다음 예제에서는 네임스페이스에 XML 트리를 만듭니다.

// Create an XML tree in a namespace.
XNamespace aw = "http://www.adventure-works.com";
XElement root = new XElement(aw + "Root",
    new XElement(aw + "Child", "child content")
);
Console.WriteLine(root);
' Create an XML tree in a namespace.
Dim root As XElement = _
    <Root xmlns='http://www.adventure-works.com'>
        <Child>child content</Child>
    </Root>
Console.WriteLine(root)

이 예제는 다음과 같은 출력을 생성합니다.

<Root xmlns="http://www.adventure-works.com">
  <Child>child content</Child>
</Root>

다음 예제에서는 중첩된 네임스페이스를 사용하여 XML 트리를 만듭니다.

// Create an XML tree with nested namespaces.
XNamespace aw = "http://www.adventure-works.com";
XNamespace fc = "www.fourthcoffee.com";
XDocument root = new XDocument(
    new XDeclaration("1.0", "utf-8", "yes"),
    new XElement(aw + "Root",
        new XElement(fc + "Child",
            new XElement(aw + "DifferentChild", "other content")
        )
    )
);
Console.WriteLine(root);
' Create an XML tree with nested namespaces.
Dim root As XDocument = _
    <?xml version='1.0'?>
    <Root xmlns='http://www.adventure-works.com'>
        <Child xmlns='www.fourthcoffee.com'>
        <DifferentChild xmlns='http://www.adventure-works.com'>other content</DifferentChild>
        </Child>
    </Root>
Console.WriteLine(root)

이 예제는 다음과 같은 출력을 생성합니다.

<Root xmlns="http://www.adventure-works.com">
  <Child xmlns="www.fourthcoffee.com">
    <DifferentChild xmlns="http://www.adventure-works.com">other content</DifferentChild>
  </Child>
</Root>

설명

이 생성자는 지정된 콘텐츠 및 특성을 사용하여 요소를 만듭니다.

문자열에서 .로의 암시적 변환이 있습니다 XName. 이 생성자의 일반적인 사용은 새 XName문자열을 만드는 대신 매개 변수로 문자열을 지정하는 것입니다.

네임스페이스에서 요소를 만들 때 일반적으로는 문자열과 함께 XNamespace 더하기 연산자 오버로드를 사용하여 만듭니다 XName. 자세한 내용은 XML 네임스페이스 작업을 참조하세요.

이 생성자에 전달할 수 있는 유효한 콘텐츠에 대한 자세한 내용은 XElement 및 XDocument 개체의 유효한 콘텐츠를 참조하세요.

추가 정보

적용 대상

XElement(XName, Object[])

Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs
Source:
XElement.cs

지정된 이름과 콘텐츠를 사용하여 클래스의 XElement 새 인스턴스를 초기화합니다.

public:
 XElement(System::Xml::Linq::XName ^ name, ... cli::array <System::Object ^> ^ content);
public XElement(System.Xml.Linq.XName name, params object[] content);
public XElement(System.Xml.Linq.XName name, params object?[] content);
new System.Xml.Linq.XElement : System.Xml.Linq.XName * obj[] -> System.Xml.Linq.XElement
Public Sub New (name As XName, ParamArray content As Object())

매개 변수

name
XName

XName 요소 이름을 포함하는 항목입니다.

content
Object[]

요소의 초기 콘텐츠입니다.

예제

다음 예제에서는 XML 트리를 만듭니다. 새 요소의 콘텐츠는 LINQ 쿼리에서 제공됩니다.

XElement xmlTree1 = new XElement("Root",
    new XElement("Child1", 1),
    new XElement("Child2", 2),
    new XElement("Child3", 3),
    new XElement("Child4", 4),
    new XElement("Child5", 5),
    new XElement("Child6", 6)
);

XElement xmlTree2 = new XElement("Root",
    from el in xmlTree1.Elements()
    where((int)el >= 3 && (int)el <= 5)
    select el
);
Console.WriteLine(xmlTree2);
Dim xmlTree1 As XElement = _
        <Root>
            <Child1>1</Child1>
            <Child2>2</Child2>
            <Child3>3</Child3>
            <Child4>4</Child4>
            <Child5>5</Child5>
            <Child6>6</Child6>
        </Root>

Dim xmlTree2 As XElement = _
    <Root>
        <%= From el In xmlTree1.Elements() _
            Where el.Value >= 3 And el.Value <= 5 _
            Select el %>
    </Root>

Console.WriteLine(xmlTree2)

이 예제는 다음과 같은 출력을 생성합니다.

<Root>
  <Child3>3</Child3>
  <Child4>4</Child4>
  <Child5>5</Child5>
</Root>

다음 예제에서는 다양한 형식의 콘텐츠를 사용하여 XML 트리를 만듭니다.

XElement root;

// String content:
root = new XElement("Root", "Some text");
Console.WriteLine(root);

// XElement object content:
root = new XElement("Root",
    new XElement("NewChild", "n")
);
Console.WriteLine(root);

// XAttribute object content:
root = new XElement("Root",
    new XAttribute("NewAttribute", "n")
);
Console.WriteLine(root);

// Double content:
double dbl = 12.345;
root = new XElement("Root", dbl);
Console.WriteLine(root);

// DateTime content:
DateTime dt = new DateTime(2006, 10, 6, 12, 30, 00);
root = new XElement("Root", dt);
Console.WriteLine(root);

// String array content:
// Any collection other than a collection of XElement or XAttribute objects
// are converted to strings. The strings are concatenated and added.
string[] stringArray = {
    "abc",
    "def",
    "ghi"
};
root = new XElement("Root", stringArray);
Console.WriteLine(root);

// XElement object array content:
XElement[] ellArray = {
    new XElement("NewChild1", 1),
    new XElement("NewChild2", 2),
    new XElement("NewChild3", 3)
};
root = new XElement("Root", ellArray);
Console.WriteLine(root);

// XAttribute object array content:
XAttribute[] attArray = {
    new XAttribute("NewAtt1", 1),
    new XAttribute("NewAtt2", 2),
    new XAttribute("NewAtt3", 3)
};
root = new XElement("Root", attArray);
Console.WriteLine(root);
Dim root As XElement

' String content:
root = <Root>Some text</Root>
Console.WriteLine(root)

' XElement object content:
root = <Root>
           <NewChild>n</NewChild>
       </Root>
Console.WriteLine(root)

' XAttribute object content:
root = <Root NewAttribute="n"/>
Console.WriteLine(root)

' Double content:
Dim dbl As Double = 12.345
root = <Root><%= dbl %></Root>
Console.WriteLine(root)

' DateTime content:
Dim dt As DateTime = New DateTime(2006, 10, 6, 12, 30, 0)
root = <Root><%= dt %></Root>
Console.WriteLine(root)

' String array content:
' Any collection other than a collection of XElement or XAttribute objects
' are converted to strings. The strings are concatenated and added.

Dim stringArray As String() = { _
    "abc", _
    "def", _
    "ghi" _
}
root = <Root><%= stringArray %></Root>
Console.WriteLine(root)

' XElement object array content:
Dim ellArray As XElement() = { _
    <NewChild1>1</NewChild1>, _
    <NewChild2>2</NewChild2>, _
    <NewChild3>3</NewChild3> _
}

root = <Root><%= ellArray %></Root>
Console.WriteLine(root)

' XAttribute object array content
Dim attArray As XAttribute() = { _
    New XAttribute("NewAtt1", 1), _
    New XAttribute("NewAtt2", 2), _
    New XAttribute("NewAtt3", 3) _
}
root = <Root><%= attArray %></Root>
Console.WriteLine(root)

이 예제는 다음과 같은 출력을 생성합니다.

<Root>Some text</Root>
<Root>
  <NewChild>n</NewChild>
</Root>
<Root NewAttribute="n" />
<Root>12.345</Root>
<Root>2006-10-06T12:30:00</Root>
<Root>abcdefghi</Root>
<Root>
  <NewChild1>1</NewChild1>
  <NewChild2>2</NewChild2>
  <NewChild3>3</NewChild3>
</Root>
<Root NewAtt1="1" NewAtt2="2" NewAtt3="3" />

다음 예제에서는 네임스페이스에 XML 트리를 만듭니다.

// Create an XML tree in a namespace.
XNamespace aw = "http://www.adventure-works.com";
XElement root = new XElement(aw + "Root",
    new XElement(aw + "Child", "child content")
);
Console.WriteLine(root);
' Create an XML tree in a namespace.
Dim root As XElement = _
    <Root xmlns='http://www.adventure-works.com'>
        <Child>child content</Child>
    </Root>
Console.WriteLine(root)

이 예제는 다음과 같은 출력을 생성합니다.

<Root xmlns="http://www.adventure-works.com">
  <Child>child content</Child>
</Root>

다음 예제에서는 중첩된 네임스페이스를 사용하여 XML 트리를 만듭니다.

// Create an XML tree with nested namespaces.
XNamespace aw = "http://www.adventure-works.com";
XNamespace fc = "www.fourthcoffee.com";
XElement root = new XElement(aw + "Root",
    new XElement(fc + "Child",
        new XElement(aw + "DifferentChild", "other content")
    )
);
Console.WriteLine(root);
' Create an XML tree with nested namespaces.
Dim root As XDocument = _
    <?xml version='1.0'?>
    <Root xmlns='http://www.adventure-works.com'>
        <Child xmlns='www.fourthcoffee.com'>
        <DifferentChild xmlns='http://www.adventure-works.com'>other content</DifferentChild>
        </Child>
    </Root>
Console.WriteLine(root)

이 예제는 다음과 같은 출력을 생성합니다.

<Root xmlns="http://www.adventure-works.com">
  <Child xmlns="www.fourthcoffee.com">
    <DifferentChild xmlns="http://www.adventure-works.com">other content</DifferentChild>
  </Child>
</Root>

설명

이 생성자는 지정된 콘텐츠 및 특성을 사용하여 요소를 만듭니다.

문자열에서 .로의 암시적 변환이 있습니다 XName. 이 생성자의 일반적인 사용은 새 XName문자열을 만드는 대신 매개 변수로 문자열을 지정하는 것입니다.

네임스페이스에서 요소를 만들 때 일반적으로는 문자열과 함께 XNamespace 더하기 연산자 오버로드를 사용하여 만듭니다 XName. 자세한 내용은 XML 네임스페이스 작업을 참조하세요.

이 생성자에 전달할 수 있는 유효한 콘텐츠에 대한 자세한 내용은 XElement 및 XDocument 개체의 유효한 콘텐츠를 참조하세요.

추가 정보

적용 대상