Use xmlcursor like below code
XmlCursor cursor =m_definitions.newCursor();
// cursor.toFirstChild();
// cursor.toFirstChild();
cursor.toEndDoc();
// System.out.println("Token type: " + cursor.currentTokenType() + " =/ "
// + cursor.xmlText());
cursor.insertNamespace("xsd", "http://www.w3.org/2001/XMLSchema");
On 5/16/06, Jan Torben Heuer <[EMAIL PROTECTED]> wrote:
Hi,
I'm not much experienced with xml beans, yet... I want to insert an xml
string into my document. It should replace an abstract element
(substitution group).
//parent
OfferingType so = xmlbeansdoc.addNewOffering();
//abstract
PropertyType op = so.addNewProperty();
//the old way, creating the elements (may be wrong)
QName sub_elem = new QName("namespace","CountProperty");
CountProperty cp = (CountProperty)
op.substitute(sub_elem,CountProperty.type);
//I'd like to do something like:
op.substituteWithString("<foo bar='300' />");
Is that possible?
Thanks,
Jan Torben
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

