Writing an

N

neroblu80

Ciao a tutti,

sto scrivendo un file XML con JDOM.
Il problema è che alla root del file devo aggiungere tre namespace per
ottenere un qualcosa del tipo:

<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/
XMLSchema">

Sono riuscito ad utilizzare root.setNamespace(ns); per inserire
l'attributo xmlns, ma non riesco proprio a trovare il modo per
inserire gli altri ns con i relativi prefissi. C'è qualche metodo che
mi sfugge? Nelle varie documentazioni non ho trovato nulla e se provo
a fare root.setAttribute("xmlns:xsi","valore"); mi da errore di
formato per il nome attributo.

Come posso fare??
Grazie mille
 
N

neroblu80

Ciao a tutti,

sto scrivendo un file XML con JDOM.
Il problema è che alla root del file devo aggiungere tre namespace per
ottenere un qualcosa del tipo:

<root xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/
XMLSchema">

Sono riuscito ad utilizzare root.setNamespace(ns); per inserire
l'attributo xmlns, ma non riesco proprio a trovare il modo per
inserire gli altri ns con i relativi prefissi. C'è qualche metodo che
mi sfugge? Nelle varie documentazioni non ho trovato nulla e se provo
a fare root.setAttribute("xmlns:xsi","valore"); mi da errore di
formato per il nome attributo.

Come posso fare??
Grazie mille

Sorry that was supposed to be translated first.... :/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top