[From nobody Wed Feb 23 13:43:21 2005 Return-Path: <jdom-interest-bounces@jdom.org> Delivered-To: el@grit.de Received: from localhost (localhost [127.0.0.1]) by mail.grit.de (Postfix) with ESMTP id 5571437107 for <el@grit.de>; Wed, 23 Feb 2005 22:42:50 +0100 (CET) Received: from servlets.kattare.com (servlets.com [69.59.195.135]) by mail.grit.de (Postfix) with ESMTP id D40C437102 for <el@grit.de>; Wed, 23 Feb 2005 22:42:48 +0100 (CET) Received: from servlets.kattare.com (localhost [127.0.0.1]) by servlets.kattare.com (8.12.10/8.12.11) with ESMTP id j1NLfTdd023892; Wed, 23 Feb 2005 13:41:32 -0800 Received: from csmtp.b-one.net (csmtp.b-one.net [195.47.247.21]) by servlets.kattare.com (8.12.10/8.12.11) with ESMTP id j1NLfPEU008100 for <jdom-interest@jdom.org>; Wed, 23 Feb 2005 13:41:28 -0800 Received: from [10.0.1.129] (unknown [84.217.11.189]) by csmtp.b-one.net (Postfix) with ESMTP id E8193FBBCF; Wed, 23 Feb 2005 22:41:20 +0100 (CET) Message-ID: <421CF87D.4070503@austers.se> Date: Wed, 23 Feb 2005 22:41:17 +0100 From: Per Norrman <per.norrman@austers.se> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: sv, en-us, en MIME-Version: 1.0 To: Dmitriy Viner <dxv7027@yahoo.com> Subject: Re: [jdom-interest] Removing xmlns:xsi, xsi:schemaLocation, xmlns References: <20050222214806.92983.qmail@web54607.mail.yahoo.com> In-Reply-To: <20050222214806.92983.qmail@web54607.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: jdom-interest@jdom.org X-BeenThere: jdom-interest@jdom.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: JDOM Mailing List for General Issues and Updates <jdom-interest.jdom.org> List-Unsubscribe: <http://www.jdom.org/mailman/listinfo/jdom-interest>, <mailto:jdom-interest-request@jdom.org?subject=unsubscribe> List-Archive: <http://www.jdom.org/pipermail/jdom-interest> List-Post: <mailto:jdom-interest@jdom.org> List-Help: <mailto:jdom-interest-request@jdom.org?subject=help> List-Subscribe: <http://www.jdom.org/mailman/listinfo/jdom-interest>, <mailto:jdom-interest-request@jdom.org?subject=subscribe> Sender: jdom-interest-bounces@jdom.org Errors-To: jdom-interest-bounces@jdom.org X-Virus-Scanned: by AMaViS 0.3.12pre8 Hi, xsi:schemaLocation is an attribute which has a namespace declared with xmlns:xsi=".....". So if you remove all attributes with that namespace, the namespace declaration will probably disappear. To clean a document from all namespaces, you must do something like this: For each element set namespace to NO_NAMSPACE For each attribute set namespace to NO_NAMESPACE For each additional namespace clear that namespace Why you would want to do that, however, is an entirely different question... /pmn Dmitriy Viner skrev: > I was wondering if anybody knows how to remove attributes xmlns:xsi, > xsi:schemaLocation from the root element. Also I"m using XMLOutputter > and it keeps adding xmlns attribute to bunch of elements. Is there some > way to remove it besides traversing each element and calling > element.setNamespace(null)? > > Regards, > Dmitriy > > > Sincerely Dmitriy Viner > > E-Mail: dxv7027@yahoo.com <mailto:dxv7027@yahoo.com> > > Cell Phone: 716-415-3096 > > ------------------------------------------------------------------------ > Do you Yahoo!? > Yahoo! Search presents - Jib Jab's 'Second Term' > <http://us.rd.yahoo.com/evt=30648/*http://movies.yahoo.com/movies/feature/jibjabinaugural.html> > > > > ------------------------------------------------------------------------ > > _______________________________________________ > To control your jdom-interest membership: > http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com _______________________________________________ To control your jdom-interest membership: http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com ]