Need to create this in xml.
<username name="first.last">
Sample output
Resolved after continuing to search forum.
VB.NET:
<username name="first.last">
<email>first.last@mailserver.com</email>
</username>
My question is how to write this line of the xml.xmlWriter.WriteStartElement("BM00_XSD05") 'Open the Main Parent Node
For i = 1 To UBound(Filearray)
Dim strname() As String = Split(Filearray(i), "@")
xmlWriter.WriteStartElement("username")
xmlWriter.WriteStartAttribute("name", strname(0))
xmlWriter.WriteEndAttribute()
xmlWriter.WriteElementString("email", Filearray(i)) 'The Child
xmlWriter.WriteEndElement() 'Close username parent Node
Next i
xmlWriter.WriteEndElement() 'Close Main parent Node
xmlWriter.Close() 'close the file
<username name="first.last">
Sample output
VB.NET:
<username d2p1:name="" xmlns:d2p1="james.ceklosky">
<email>james.ceklosky@siemens.com </email>
</username>
Resolved after continuing to search forum.
VB.NET:
xmlWriter.WriteStartElement("username")
xmlWriter.WriteStartAttribute("name") 'writes only "name"
xmlWriter.WriteValue(strname(0)) 'writes username
xmlWriter.WriteEndAttribute()
xmlWriter.WriteElementString("email", Filearray(i)) 'The Child
xmlWriter.WriteEndElement() 'Close username parent Node
Last edited: