Importing a document and moving the namespace
Max Pimm <[email protected]> Wed, 8 May 2013 14:29:42 +0200
| Newsgroups | gmane.text.xml.xmlbeans.user |
|---|---|
| Message-ID | <CAELosovd4=QVrx+NPOFRA6maezdfyTLWmySk6kFc25E6L-kmGQ@mail.gmail.com> |
--bcaec50163c39b9ca204dc341667 Content-Type: text/plain; charset=ISO-8859-1 This is probably an easy one... In my schema i have an element that can also be used as a root element of another document. I am trying to import an external file representing the other document into an element in my document. The file representing the other document is something like <ns:otherDoc xmlns:ns="http://../otherDoc"> <someElement>a</someElement> </ns> This gets imported fine but the namespace is written in the element where it is imported and i would like to move the namespace declaration to the root of my document. I've tried varios xmlOptions to no avail. What am i missing? Thanks Max --bcaec50163c39b9ca204dc341667 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div style>This is probably an easy one...</div><div><br><= /div>In my schema i have an element that can also be used as a root element= of another document.<div><br></div><div style>I am trying to import an ext= ernal file representing the other document into an element in my document.<= /div> <div style><br></div><div style>The file representing the other document is= something like</div><div style><br></div><div style><ns:otherDoc xmlns:= ns=3D"http://../otherDoc"><br></div><div style>=A0 =A0<some= Element>a</someElement></div> <div style></ns></div><div style><br></div><div style>This gets impor= ted fine but the namespace is written in the element where it is imported a= nd i would like to move the namespace declaration to the root of my documen= t.</div> <div style><br></div><div style>I've tried varios xmlOptions to no avai= l.</div><div style><br></div><div style>What am i missing?</div><div style>= <br></div><div style>Thanks</div><div style>Max</div><div style><br></div> <div style><br></div><div style><br></div></div> --bcaec50163c39b9ca204dc341667--