XAttribute with namespace : XAttribute « XML LINQ « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net » XML LINQ » XAttributeScreenshots 
XAttribute with namespace
 

Imports System
Imports System.Xml
Imports System.Xml.Schema

Class MainClass

    Shared Sub Main()


        Dim As XElement = New XElement("{http://www.domain.com}Root", _
             New XAttribute("{http://www.domain.com}Att""content"_
        )
        Console.WriteLine(e)

    End Sub

End Class

   
  
Related examples in the same category
1.Build an XML element in memory
2.FirstName tag's parent has attributes
3.Query elements by attribute value
4.Using Linq Xml to query attribute
5.The element axis property (<>) and the attribute axis property (@) are used to access the id attribute.
6.XAttribute Class represents an XML attribute.
7.Create XAttribute class from the specified name and value.
8.XAttribute.IsNamespaceDeclaration
9.XAttribute.Name Property gets the expanded name of this attribute.
10.XAttribute.NextAttribute Property gets the next attribute of the parent element.
11.XAttribute.NodeType Property gets the node type for this node.
12.XAttribute.PreviousAttribute Property gets the previous attribute of the parent element.
13.XAttribute.Remove removes this attribute from its parent element.
14.XAttribute.SetValue sets the value of this attribute.
15.Converts the current XAttribute object to a string representation.
16.XAttribute.Value Property gets or sets the value of this attribute.
17.XAttribute object content
18.XAttribute object array content
19.XElement.Attribute returns the XAttribute of this XElement that has the specified XName.
20.ReplaceAll with an XAttribute object
21.ReplaceAll with an array of XAttribute objects
22.Add XAttribute with namespace to XElement
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.