Question: I have a sample.xml which looks like this

`<?xml version="1.0" ?>
 <Employee>
 <Name>ABC</Name> 
 <EmpId>100011</EmpId> 
 <Occupation>Programmer</Occupation> 
 <Company>XYZ</Company> 
 </Employee>`
`
 and the code to parse it is 

```
def display = {
        def parser = new XmlParser()
        def doc = parser.parse("grails-app/conf/sample.xml")
        def map =  [data: doc]
        render (view:'/myxml',model:map) }

```

When I run this app I get the output as shown on myxml.gsp

`Employee[attributes={}; value=[Name[attributes={}; value=[ABC]], EmpId[attributes={}; 
value=[100011]], Occupation[attributes={}; value=[Programmer]],Company[attributes={}; 
value=[XYZ]]]]`

Is there any way I can get it in the format as shown

```
<Employee>
<Name>ABC</Name>
<EmpId><100011</EmpId>
<Occupation>Programmer</Occupation>
<Company>XYZ</Company>
</Employee>

```

?

Answer: 
You could go back to using the ASP TextBoxes and access the ids in JavaScript as follows:

```
<%= IDofTextBox.ClientID %>

```

It's probably the easiest as naturally they can then be accessed in the code behind very easily.
This is not the right way to do it (I wouldn't recommending it), but if its what you need, then it will work.

Add `method="post" action="<your path here>"` to your form element and when the submit button posts, you will be able to access all the form variables like so: 

```
string txtName = Request["TextBox1"] ?? string.Empty; //replace textbox 1 with text box name

```

Just be sure to replace the action in form to your page etc..

But really, going back to `<asp:TextBox...` will save you a lot more time and as Ian suggested, you can access them with javascript by the server tags `<%= TextBox1.ClientId %>`

ps: also, the `??` is a null coalesce character. its a short form of saying

```
if(Request["textbox1"] != null)
    txtName = Request["textbox1"];
else
    txtName = "";

```