[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    Re: Forcing namespace prefixes
From:       Christian Kaltepoth <lists () kaltepoth ! de>
Date:       2007-10-10 15:33:41
Message-ID: 200710101733.41851.lists () kaltepoth ! de
[Download RAW message or body]

Hi,

if I remember correctly you have to use the namespace uri as the key in the 
HashMap and not the prefix. Try using this:

mappingNameSpaces.put("http://my_uri", "trn");

Kind regards

Christian Kaltepoth


On Wednesday 10 October 2007 16:25:22 Sandra Mendez wrote:
> I would like to save un xml with a specific namespace.  I tried the
> following: Map mappingNameSpaces = new HashMap();
> mappingNameSpaces.put("trn", http://my_uri);
>
> XmlOptions xmlOptions = new XmlOptions();
> xmlOptions.setSaveOuter();
> xmlOptions.setSaveSuggestedPrefixes(mappingNameSpaces);
>
> ClassXmlBean.xmlText(xmlOptions));
>
> I got my xml with no prefixe "trn".  Does anyone know how to do this?
>
>
>      
> ___________________________________________________________________________
>__ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo!
> Mail



-- 
Christian Kaltepoth <christian@kaltepoth.de>
GnuPG Key: http://www.kaltepoth.de/gnupg/pubkey.asc
Fingerprint: 9F04 0A94 CC40 C3EF 1A69  B2BB 51F4 4C84 BEB6 F127

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic