Skip to main content



      Home
Home » Modeling » UML2 » Re: How to change XML Serilization format
Re: How to change XML Serilization format [message #625678] Thu, 06 December 2007 07:50
Eclipse UserFriend
Brajesh,

Comments below. I copied the UML2 newsgroup to get their opinion on
what you are trying to achieve.


brajesh K. wrote:
> Hi All!
> I need to change a bit the default XML serialization format.
> By default, the serialized document looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:uml="http://www.eclipse.org/uml2/1.0.0/UML"
> xmi:id="_0nu3QKO6Edy--aGJ0GKhYw">
> <ownedMember xmi:type="uml:Package" xmi:id="_SyEVEW-zEducsu2zqSynDA"
> name="ClassDiagram1">
> <ownedMember xmi:type="uml:Class" xmi:id="_1-AtsKO6Edy--aGJ0GKhYw"
> name="Class1">
> </ownedMember>
> </ownedMember>
> <ownedMember xmi:type="uml:PrimitiveType"
> xmi:id="_0_IDkKO6Edy--aGJ0GKhYw" name="String">
> </ownedMember>
> <ownedMember xmi:type="uml:PrimitiveType"
> xmi:id="_0_IDkaO6Edy--aGJ0GKhYw" name="Integer">
> </ownedMember>
> <ownedMember xmi:type="uml:PrimitiveType"
> xmi:id="_0_IDkqO6Edy--aGJ0GKhYw" name="Boolean">
> </ownedMember>
> <ownedMember xmi:type="uml:PrimitiveType"
> xmi:id="_0_IDk6O6Edy--aGJ0GKhYw" name="UnlimitedNatural">
> </ownedMember>
> </uml:Model>
This looks like the serialization of the UML2 model.
>
> I want it to look as follows:
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <XMI xmi.version="1.1" xmlns:UML="ABC">
> <XMI.header>
> <XMI.documentation>
> <XMI.exporter>XYZ</XMI.exporter>
> <XMI.exporterVersion>1.1</XMI.exporterVersion>
> </XMI.documentation>
> <XMI.metamodel xmi.name="UML" xmi.version="1.3"/>
> </XMI.header>
> <XMI.content>
> <UML:Model xmi.id="1100411" name="xmiconversion1" visibility="public"
> isSpecification="0" isRoot="0" isLeaf="0" isAbstract="0">
> <UML:Namespace.ownedElement>
> <UML:Package xmi.id="1000000" name="" visibility="public"
> isSpecification="0" isRoot="0" isLeaf="0" isAbstract="0"
> namespace="1100411">
> <UML:Namespace.ownedElement>
> <UML:Class namespace="1000000" xmi.id="1253556" name="class2"
> visibility="public" isSpecification="0" isRoot="0" isLeaf="0"
> isAbstract="false" isActive="0">
> <UML:Classifier.feature>
> <UML:Operation xmi.id="1253557" name="class2" visibility="public"
> isSpecification="0" ownerScope="instance" isQuery="0"
> concurrency="Sequential" isRoot="0" isLeaf="-1" isAbstract="false"
> specification=""/>
> </UML:Classifier.feature> </UML:Class>
>
This doesn't tell me the general pattern you are trying to follow (and
the it's not even well formed XML). Does this conform to some old
version of the UML specification? What tool needs XMI 1.3 support?
I'd be surprised that IDs should just be numbers since that doesn't
conform to XML Schema's constraint that it be an NCName (and hence must
start with a letter). You'd have a specialize an awful lot of the
XMLSaveImpl code to achieve a result like the above and I'm not even
sure what the pattern is...
> Pls. let me know how can i do this. Regds
> Brajesh
>
Previous Topic:Using template classifier defined in a Profile
Next Topic:uml model with profile application
Goto Forum:
  


Current Time: Sun Aug 31 14:55:59 EDT 2025

Powered by FUDForum. Page generated in 0.02936 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top