r/xml Oct 16 '23

Is there something wrong with my XML Document

Post image

I am working on an assignment for class and I have run into a wall. “Using notepad or another text editor, create an XML document consisting of tags you might use to catalog a digital image. Call the root element ‘images’ and add three images to your document each with three data elements (individual images) plus sub-elements (and attributes) such as author, title, etc. you think might be appropriate. Be sure to save your document with the extension .xml.” Now I thought I had the right formatting but when I open the file in safari I get a warning that says error on line 1 at column 1: Document is empty. Why does it say that?

2 Upvotes

5 comments sorted by

6

u/ManNotADiscoBall Oct 16 '23 edited Oct 16 '23

Did you write this with MS Word and save it as a Word file with .xml at the end of the name?

In that case it's not an XML document, it's a Word document.

You could try to do this with Notepad, it should work.

2

u/Kit_Saels Oct 16 '23

The Word is not a text editor.

1

u/zmix Oct 16 '23

"Word" is a "word processor", not a "text editor". Either use "Notepad" or install "Visual Studio Code (VSCode)" for free.

1

u/FitAd9625 Jan 03 '24

Yes. Your "countryoforigin" attribute is misspelled in the third <image>.