XML - Document cannot contain multiple root elements

前端 未结 1 1611
长情又很酷
长情又很酷 2020-12-22 03:28

I was trying to merge with git, but it apparently caused a problem with the XML file making a project unavailable. I know nothing about XML. Here is an excerpt of my file:<

相关标签:
1条回答
  • 2020-12-22 04:18

    An XML documents must have a single root element. To solve your problem:

    • Remove all root elements except for one, or
    • Wrap all top-level elements in a single root element.

    Until you ensure that your XML document has a single root element, your file will not be well-formed (and will not actually be XML). Also, if your document is intended to follow a schema, make sure the root element and its contents (recursively) is valid according to the schema (XSD, DTD, etc). For more on this, see well-formed vs invalid XML.

    As Alex K points out, your XML document looks like it's intended to be a MSBuild Project file.

    0 讨论(0)
提交回复
热议问题