VB.NET XML Literal Expression Expected with Linq to XML
问题 I have the same problem as stated in this question, but the accepted solution there was a "works on my machine" answer. Here is my code: Dim document As XDocument = _ <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <GetUser xmlns="http://foo.com/bar.asmx"> <encryptedHash>HashString</encryptedHash> <accessKey