Skip to main content

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 DywickiFriend
Messages: 31
Registered: July 2009
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">
attribute="before" />

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

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

I've UI created by eclipse forms and next editors also will have UI
based on forms. Example editor: NG

Does EMF can do this?

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

Current Time: Mon Jun 25 17:58:19 GMT 2018

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

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

Back to the top