Im having a problem with the XML in this function and many functions like it.
Error
XML axis properties do not support late binding.
Namespace
Imports Microsoft.VisualBasic
Imports System.Web
Imports System.IO
Imports System.Xml.Linq
Function
Public Shared Function get_intro(ByVal root_folder As String) As String
Dim content As String = ""
Dim docXML = XDocument.Load(root_folder & print_shop_doc)
Dim intro_doc = From doc In docXML...<d:printshopdoc> _
Select New With {.intro = doc.<d:intro>.Value}
content = "<p" & no_indent & ">" & intro_doc(0).intro & "</p>" & vbCrLf
Return content
End Function
docXML...<d:printshopdoc>
seems to be where the error is occurring and I’m not quite sure how to fix it.
Does putting an XML namespace declaration
Imports <xmlns:d="http://example.com/">(where instead ofhttp://example.com/you put the namespace URI used in the input XML) fix the problem?