Hi All,
I have a function. It creates an XML element with namespace "pre":
Function newElement(ByVal doc As XmlDocument, _
ByVal Name As String, _
Optional ByVal text As String = Nothing, _
Optional ByVal pre As String = Nothing) As XmlElement
Dim xmlEl As XmlElement = doc.CreateElement(pre, Name, "")
If Not (text IsNothing) Then xmlEl.InnerText = text
doc.DocumentElement.AppendChild(xmlEl)
Return xmlEl
EndFunction
Then, I call that function in this way:
newElement(xmlDoc, "FirstName", "Peter", "pre")
I expect the result:
<pre:FirstName>Peter</FirstName>
However, the result has no "pre:", just:
<FirstName>Peter</FirstName>
Why?????
Mike
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Offline 2 posts
since Jun 2006
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Offline 1 posts
since Jul 2006
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a
new thread in this forum instead.
Previous Thread in VB.NET Forum Timeline: Iis