Reading, editing and storing XML file [message #602563] |
Tue, 07 August 2007 22:52 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02774 seconds