# Rexml error

**URL:** <https://www.ruby-forum.com/t/rexml-error/148933>\
**Category:** Ruby\
**Created:** [September 18, 2008, 2:06pm UTC](https://www.ruby-forum.com/t/rexml-error/148933 "2008-09-18T14:06:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/97f17d/32.png) [@ericw](https://www.ruby-forum.com/u/ericw)\
**Post date:** [September 18, 2008, 2:06pm UTC](https://www.ruby-forum.com/t/rexml-error/148933/1 "2008-09-18T14:06:17Z")

</div>

Any time it parses anything that has “xmlns:xml” defined, it spits out  
an error saying you MUST NOT redefine this attribute. However,  
according to the XML spec:

The prefix xml is by definition bound to the namespace name  
[The "xml:" Namespace](http://www.w3.org/XML/1998/namespace). It MAY, but need not, be  
declared, and MUST NOT be bound to any other namespace name. Other  
prefixes MUST NOT be bound to this namespace name, and it MUST NOT be  
declared as the default namespace.

In other words, it MAY be defined as  
[The "xml:" Namespace](http://www.w3.org/XML/1998/namespace). REXML doesn’t check to see what  
it’s defined as, it just dies anytime it sees it defined.

---

<div class="post-metadata">

**Author:** ![ericw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/97f17d/32.png) [@ericw](https://www.ruby-forum.com/u/ericw)\
**Post date:** [September 18, 2008, 9:25pm UTC](https://www.ruby-forum.com/t/rexml-error/148933/2 "2008-09-18T21:25:00Z")

</div>

On Sep 18, 7:58 am, Eric W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> In other words, it MAY be defined ashttp://www.w3.org/XML/1998/namespace. REXML doesn’t check to see what  
> it’s defined as, it just dies anytime it sees it defined.
> 
> –  
> Eric W.

I suggest you report it as a bug. I see a similar one:  
[http://www.germane-software.com/projects/rexml/ticket/106](http://www.germane-software.com/projects/rexml/ticket/106)

- Mark.

P.S. in the mean time you may want to try libxml-ruby which is pretty  
stable these days.

---

<div class="post-metadata">

**Author:** ![ericw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/97f17d/32.png) [@ericw](https://www.ruby-forum.com/u/ericw)\
**Post date:** [September 18, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/rexml-error/148933/3 "2008-09-18T22:27:58Z")

</div>

On Thu, Sep 18, 2008 at 1:27 PM, Mark T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I suggest you report it as a bug. I see a similar one:  
> [http://www.germane-software.com/projects/rexml/ticket/106](http://www.germane-software.com/projects/rexml/ticket/106)

That ticket is wrong. It’s fine to define it as the default namespace.  
I can’t correct anything, because their tracker requires registration.  
No thanks.

> - Mark.
> 
> P.S. in the mean time you may want to try libxml-ruby which is pretty  
> stable these days.

I’ll look into it.
