Idea – List of vertices(Key, X, Y, Priority to store).
<?xml version="1.0" encoding="utf-8"?>
<Vertices>
<Vertex Key="0" X="149" Y="209" Priority="7" />
<Vertex Key="1" X="278" Y="128" Priority="7" />
</Vertex>
Is this valid XML? It keeps saying me that root element is missing, when i try to open it… If so, can someone provide a valid c# XDocument code to open this file ?
It’s not valid XML – your closing element has the wrong name – this would be valid:
Also make sure that if you are loading an XML file you use
XDocument.Loadand notXDocument.Parse.