Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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 DywickiFriend
Messages: 34
Registered: July 2009
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 Apr 26 21:04:52 GMT 2024

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

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

Back to the top