# ActiveResource and XML-issues

**URL:** <https://www.ruby-forum.com/t/activeresource-and-xml-issues/126565>\
**Category:** Rails\
**Created:** [January 19, 2008, 5:10pm UTC](https://www.ruby-forum.com/t/activeresource-and-xml-issues/126565 "2008-01-19T17:10:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 19, 2008, 5:10pm UTC](https://www.ruby-forum.com/t/activeresource-and-xml-issues/126565/1 "2008-01-19T17:10:29Z")

</div>

Hi!

I have a strange problem with ActiveResources:

When ActiveResource parses the following XML, it throws a RuntimeError  
and displays the following Error-message:  
“can’t typecast “[http://example.net/faktura](http://example.net/faktura) units.xsd””

the xml:

\<?xml version="1.0" encoding="UTF-8"?\>

1  
kg  
  
  
2  
ltr

When I remove the “xsi:schemaLocation”-attribute it works like it  
should.

I found the Rails-changeset where this message (“can’t typecast…”)  
was introduced, but that did not help me. ([http://dev.rubyonrails.org/](http://dev.rubyonrails.org/)  
changeset/7074?format=html&new=7074)

Does anyone know if the “xsi:schemaLocation”-attribute means something  
special to ActiveResource?

Thanks for any help and greetings,

- dominik

PS: I need this attribute for (pre-Rails) validation and so this is  
not a good solution! 😉

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 19, 2008, 7:42pm UTC](https://www.ruby-forum.com/t/activeresource-and-xml-issues/126565/2 "2008-01-19T19:42:41Z")

</div>

Rails can’t deserialize xml with namespaces. See:  
[http://dev.rubyonrails.org/ticket/6473](http://dev.rubyonrails.org/ticket/6473)

On Jan 19, 8:09 am, “removed\_email\_address@domain.invalid”
