# No XML rendered in this example, why not?

**URL:** <https://www.ruby-forum.com/t/no-xml-rendered-in-this-example-why-not/114848>\
**Category:** Rails\
**Created:** [September 18, 2007, 5:21am UTC](https://www.ruby-forum.com/t/no-xml-rendered-in-this-example-why-not/114848 "2007-09-18T05:21:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yottameter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/df705f/32.png) [@yottameter](https://www.ruby-forum.com/u/yottameter)\
**Post date:** [September 18, 2007, 5:21am UTC](https://www.ruby-forum.com/t/no-xml-rendered-in-this-example-why-not/114848/1 "2007-09-18T05:21:46Z")

</div>

I know I’m calling the controller correctly, I get

XML Parsing Error: no element found  
.xml;example  
Line Number 1, Column 1:

def example  
xml = Builder::XmlMarkup.new(:indent=\>2)  
xml.instruct!  
xml.person  
return xml

```
respond_to do |format|
  format.html # index.rhtml
  format.xml { render :xml => xml }
end

```

end
