Question: I am looking for help to achieve the following

The Diagram represents a car, users can add engine and colour

when I view the XML it looks like this:

```
<Car>
  <Engine>BigEngine</Engine>
  <Colour>Pink</Colour>
</Car>

```

What I would like to do is to wrap the car inside 'vehicle', i.e

```
<Vehicle>
  <Car>
    <Engine>BigEngine</Engine>
    <Colour>Pink</Colour>
  </Car>
</Vehicle>

```

I am not sure of the best way to achieve this. I want the model explorer and the generated XML to be wrapped in 'vehicle' but for all other intents and purposes the user is working with a car only

Info: Visual Studio 2010, C# and DSL SDK for 2010

Answer: 
not sure how to do it in Jquery

```
window.onbeforeunload = function (e) {
  var e = e || window.event;

  // For IE and Firefox
  if (e) {
    e.returnValue = 'Any string';
  }

  // For Safari
  return 'Any string';
};

```

<https://developer.mozilla.org/en/DOM/window.onbeforeunload>
The event you're looking for is beforeunload, you can stop a page refresh like this:

```
$(window).bind('beforeunload', function(){ 
    return '';
});

```