Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Reading, editing and storing XML file
Reading, editing and storing XML file [message #602563] Tue, 07 August 2007 22:52
Lukasz Dywicki is currently offline Lukasz Dywicki
Messages: 16
Registered: July 2009
Junior Member
Hello everyone!

I try to create some editors for XML files based on XML Schema.
Currently i using JAXB for reading and storing data. This is great tool
- i can read and store data in three lines.. but there is small problem.

For example - i reading by JAXB structure:

<?xml version="1.0" encoding="UTF-8"?>
<root xmlns="urn:foo:bar">
<element
attribute="before" />
</root>

After storing i'll got:
<?xml version="1.0" encoding="UTF-8"?><root xmlns="urn:foo:bar"><element
attribute="after" /></root>

I can set property for formating etc, but that's not end. JAXB generate
namespace prefixes - so if i want save other namespaces prefixes (before
common, validation etc, after ns1, ns2 and so on) i must create own
NamespacePrefixMapper who will read prefixes from file and give it for
JAXB. I don't want fight with JAXB but everything is going to this -
i'll write prostheses.

And the point of my question - is there any way to read, edit and store
XML without problems JAXB-like problems? I mean - read to objects (i
don't need SAX or DOM-like functionality), edit (setting objects
properties) objects and store only changed attributes [for example given
above]:

<?xml version="1.0" encoding="UTF-8"?>
<root xmlns="urn:foo:bar">
<element
attribute="after change" />
</root>

I've UI created by eclipse forms and next editors also will have UI
based on forms. Example editor:
http://img.wklej.org/v.php?id=76022agavi%20module%20editor.P NG

Does EMF can do this?

Regards,
Luke
Previous Topic:EClass for prefix and namespace definition?
Next Topic:Reading, editing and storing XML file
Goto Forum:
  


Current Time: Fri Sep 19 14:05:08 GMT 2014

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

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