# Possible Elements bug when XML tag is left unclosed

**URL:** https://talk.remobjects.com/t/possible-elements-bug-when-xml-tag-is-left-unclosed/18320
**Category:** Elements
**Tags:** elements-10
**Created:** [January 3, 2019, 7:21pm UTC](https://talk.remobjects.com/t/possible-elements-bug-when-xml-tag-is-left-unclosed/18320 "2019-01-03T19:21:20Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![zmattr](https://talk.remobjects.com/user_avatar/talk.remobjects.com/zmattr/32/7989_2.png) [@zmattr](https://talk.remobjects.com/u/zmattr)
#### Post date: [January 3, 2019, 7:21pm UTC](https://talk.remobjects.com/t/possible-elements-bug-when-xml-tag-is-left-unclosed/18320/1 "2019-01-03T19:21:20Z")

</div>

I get what seems to be a bug in Elements 10.0.0.2358 when trying to build or clean with an XML tag left unclosed in the `project` file or the `user` file. Obviously the xml is in fact malformed, but Elements doesn’t point to the problematic file or line.

```
Exception: Unexpected token. TagClose is expected but TagElementEnd found at 12/3
    at RemObjects.Elements.RTL.XmlDocument.FromFile(String aFileName)
    at RemObjects.EBuild.Elements.EBuildElementsProject..ctor(String aFile)
    at RemObjects.EBuild.Elements.EBuildElementsProject.MetaClass.new__withFile(String aFile)
    at RemObjects.EBuild.ProjectRegistry.CreateProjectWithFile(String aFileName)
    at RemObjects.EBuild.EBuildSolution.LoadProjectWithURL ____ typeID(Url aProjectUrl, Guid aProjectTypeID)
    at RemObjects.EBuild.EBuildSolution.LoadFromString(String aString, Boolean aLoadProjects)
    at RemObjects.EBuild.CommandLine.Load(String aFileName)
    at RemObjects.EBuild.CommandLine.RunWithParameters ____ HostMode(SimpleCommandLineParser aParameters, Boolean aHostMode)
```

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [January 3, 2019, 8:52pm UTC](https://talk.remobjects.com/t/possible-elements-bug-when-xml-tag-is-left-unclosed/18320/2 "2019-01-03T20:52:50Z")

</div>

Seems pretty much as expected, to me, if the project XML is broken. It does show the location of the problem in the XML Exceptiomn: line 12, column 3.

---

<div class="post-metadata">

### Author: ![zmattr](https://talk.remobjects.com/user_avatar/talk.remobjects.com/zmattr/32/7989_2.png) [@zmattr](https://talk.remobjects.com/u/zmattr)
#### Post date: [January 4, 2019, 12:58pm UTC](https://talk.remobjects.com/t/possible-elements-bug-when-xml-tag-is-left-unclosed/18320/3 "2019-01-04T12:58:36Z")

</div>

Ah I didn’t realize that was what 12/3 was indicating. “Bug” may be a bit strong. It would be nice though if the compiler pointed to the problematic file, or at least indicate that the problem is with a project file. All I knew was that it was an XML parsing issue, and I have dozens of XML files in my project.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [January 4, 2019, 2:16pm UTC](https://talk.remobjects.com/t/possible-elements-bug-when-xml-tag-is-left-unclosed/18320/4 "2019-01-04T14:16:04Z")

</div>

I’ll see if I can improve the error message.

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [January 4, 2019, 2:32pm UTC](https://talk.remobjects.com/t/possible-elements-bug-when-xml-tag-is-left-unclosed/18320/5 "2019-01-04T14:32:34Z")

</div>

Done.
