I'm writing an xml file from access database to import in some web page, using this:
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Dim Fileout As Object
Dim myxml As String
Dim rs As DAO.Recordset
Set Fileout = fso.CreateTextFile(strpath, True, True)
myxml = .......
Fileout.Write myxml
Fileout.Close
It writes a an xml file. I use notepad++ to check it and it looks ok, same as the template I've got from the upload site.
I've got this error when I try to validate the file there
The following error occurred: XML-File has invalid syntax. reported error is: javax.xml.bind.UnmarshalException: Content ist nicht zulässig in Prolog. - with >linked exception: [org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: >1; Content ist nicht zulässig in Prolog.]
I then found an xml validator online (https://www.xmlvalidation.com) to look for help and got this:
1 Content is not allowed in prolog.
ÿþ<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
There were no other errors in file.
What are these weird signs at the beginning of my first line and how to prevent this?
I have no experience with xml so far, this is my first attempt, so i'm a bit in the dark here.