Why? It's better to assume you won't be able to get that to work.
On 01/06/2012 10:25 AM, Hela Hakim wrote:
> Hello,
> I would like to change l'extension .UML (file extension with the
> papyrus) with the extension .XML.
> and thanks. :)
Hello,
Sorry,but i misunderstood your message.
En fact ,I want to manipulate the fichier.UML via JDOM (through a Java class).
Gold after my research I knew that for 'parsing' a file with JDOM it should be .XML not . UML .
That is very unwise. *.uml is for the many Eclipse UML namespaces. *.xmi
for the many OMG UML namespaces.
Of course, if you wish to say good bye to most of the Eclipse Modeling
tools, just go ahead and change the extension.
If you really really want to be foolish, probably because of some
misguided corporate policy that you would do better to get changed, you
should develop a plugin that ensures that all the required content type
registrations are in place for UML namespaces against the *.xml
extension and that you use no applications that register resource
factories for the *.xml extension. [If you don't know what the foregoing
means, you really do not want to do it.]
Regards
Ed Willink
On 01/06/2012 09:25, Hela Hakim wrote:
> Hello,
> I would like to change l'extension .UML (file extension with the
> papyrus) with the extension .XML.
> and thanks. :)
One if the major purposes of the MDT/UML2 projects is to support XMI to
Java classes serialisation. This is a non-trivial activity given the
complexity of some of UML's magic subsetting, merging, redefining and
stereotyping capabilities. Why would you want to rewrite it all in an
inferior technology?
Regards
Ed Willink
On 01/06/2012 09:50, Hela Hakim wrote:
> Hello,
> Sorry,but i misunderstood your message.
> En fact ,I want to manipulate the fichier.UML via JDOM (through a Java
> class).
> Gold after my research I knew that for 'parsing' a file with JDOM it
> should be .XML not . UML .
I can not be understood but to conclude :is the following statement:
SAXBuilder SXB = new SAXBuilder ();
try {
/ / Create a new document with JDOM XML file as argument
sxb.build document = (new File ("file.xml"));
}
but my file is file.uml not file .xml.
I hope you understand me.
Regards
SAX doesn't care about the extension of your file; you can use any file
name.
On 01/06/2012 11:21 AM, Hela Hakim wrote:
> I can not be understood but to conclude :is the following statement:
> SAXBuilder SXB = new SAXBuilder (); try { / / Create a new document
> with JDOM XML file as argument
> sxb.build document = (new File ("file.xml"));
> }
> but my file is file.uml not file .xml.
> I hope you understand me.
> Regards