How to load XDocument from string?

S-Soft 666 Reputation points
2023-01-15T20:56:30.4333333+00:00

Hello,

I have an xml stored in a string (its source is not a file)

How can I load it into a new XDocument? Possible? Just need to parse it and get some fields out of it...

Thanks.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,449 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,833 questions
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 121.3K Reputation points
    2023-01-15T21:00:16.6833333+00:00

    Try Dim doc As XDocument = XDocument.Parse( mystring ).

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.