On Fri, 22 Jun 2001, luca wrote: > I want to create a xml file with this content: > <?xml version="1.0" ?> > <bsmart xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="BkmsSchema2.xsd"/> > > and stop. > > I wrote this: > ... > String xmlns="http://www.w3.org/2000/10/XMLSchema"; > String xsiNS="http://www.w3.org/2000/10/XMLSchema-instance"; > > Document document = new DocumentImpl(); > document.createProcessingInstruction("xml","version"); > document.appendChild(document.createElement("bsmart"));
I don't know how well the serializer handles the namespace declaration parts, but I do know that the xml declaration isn't a processing instruction, it just looks like one, and I think the serializer will put it in for you automatically. Ian -- Ian Roberts, Software Engineer DecisionSoft Ltd. Telephone: +44-1865-203192 http://www.decisionsoft.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
