我在下面的函数中收到此错误。
Public Function GetXmlEnvironment(ByVal xmlTree As XmlNode, ByVal objUser As XTUser, ByVal objModule As XTModuleInfo, ByVal objProject As XTProject, ByVal objPage As IXTPage) As XmlNode
Dim objXml As XmlDocument = New XmlDocument()
Dim xmlEnvironment As XmlElement
xmlEnvironment = objXml.CreateElement("Environment")
If (xmlTree.HasChildNodes()) Then
xmlTree.FirstChild.AppendChild(xmlEnvironment) ' Error occurs here
End If
' ...
End Function
我是否需要将XmlElement转换为XmlNode? p>
答案 0 :(得分:2)
Select()