Please help

I have to store the pages in to the paginas() as xml node property, but i don’t know what code to use.
So far i have this

Dim fi As FolderItem = GetFolderItem("/Users/natasja/Desktop/mnf.xml", folderitem.PathTypeShell)
self.MNF = New XmlDocument // ik moet het XMLDocument nog maken, alleen een property maakt het object nog niet
self.MNF.LoadXml(fi)

Dim xml As New XmlDocument
Try
xml.LoadXml(fi)
Catch

End Try

Dim root As XMLNode
root = xml.DocumentElement

For rootchild As Integer = 0 To root.ChildCount-1

If root.Child(rootchild).name = "page" Then
  Dim pageNode As XmlNode = root.child(rootchild) 
  
  
End If

Next

Hi @Natasja van den Hogen

Try to simply load the XML into the MNF property using:

self.MNF = new XMLDocument( SpecialFolder.Desktop.child(“mnf.xml”) )

dim root as XMLElement = Self.MNF.DocumentElement //this one is the Root element for the document

That should give you a working XML instance if there is the indicated file on your Mac Desktop and if the xml file is a valid one. Of course, you can wrap this with an Try… Catch block.

Javier Rodriguez
GuancheMOS for Xojo Developers

You should really change your thread title to something more descriptive …