Michael,

Take at a look at the docs on XmlOptions.

E.g.

public XmlOptions setSaveSuggestedPrefixes(Map suggestedPrefixes).


Create and set the options you require then pass the XmlOptions into your 
xmlText() call.

Regards

Don

-----Original Message-----
From: Michael Wirz [mailto:[EMAIL PROTECTED] 
Sent: 14 October 2005 18:53
To: [email protected]
Subject: write an xmlbean to string: creating xmlns:xsi and the like

Hello List,
I am using xmlbeans to create an xml document, the bean is named 
RequestDocument as below:

RequestDocument reqDoc = RequestDocument.Factory.newInstance();
RequestType request = reqDoc.addNewRequest();

I then fill all the members and do a

String dataString = reqDoc.xmlText();

The document element shows up as

<mpc:Request xmlns:mpc="http://www.xyz.de/test";>

I'd like it to show up as

<mpc:Request xmlns:mpc="http://www.xyz.de/test";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.xyz.de/test
http://www.xyz.de/test2/mpcdta_1.0.xsd ">

How do I do this with the XMLBeans API ?
At the moment it is some ugly string/substring/indexof stuff...

Thanks a lot for help!
Michael Wirz
from near Munich, Germany


--
abs IT Service GmbH
abs gruppe
Michael Wirz
Entwicklung

Landsberger Straße 57
82266 Stegen am Ammersee
Telefon: +49 (0)8143 999 43
Telefax: +49 (0)8143 999 49

[EMAIL PROTECTED]
www.eFonds24.de


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to