[xsde-users] Update existing data model with differencial XML
Bernhard Rapp
bernhard.rapp at student.tugraz.at
Thu Jun 21 04:39:04 EDT 2018
Hi,
I would like to ask, if there is an efficient way, to update an
existing data model (build by parsing the first XML) with an
"differential" one(second XML).
I see the possibility to write a custom parser, which should make it
possible to add the extra code. But I just want to make sure, that I
don't oversee the obvious easy way to do so :)
The "differential" XML is within an dedicated Element-Node
(<update/>), as you can see in the example below.
I didn't find any hint to such a thing.
Thank you very much in advance,
Bernhard
---
Again, what I want by example:
1.) first XML to setup data structure
<root>
<Config> <!-- xsd type: config_t -->
<Item>
<Name>first</Name>
<Parameter Name="first">1</Parameter>
<Parameter Name="second">2</Parameter>
</Item>
<Item>
<Name>second</Name>
<Parameter Name="first">3</Parameter>
<Parameter Name="second">4</Parameter>
</Item>
</Config>
</root>
2.) second XML to update data structure
<root>
<Update> <!-- This node indicates that we want to update the
existing data structure with the following diff -->
<Config> <!-- xsd type: config_t -->
<Item>
<Name>first</Name>
<Parameter Name="first">5</Parameter>
</Item>
</Config>
</Update>
</root>
3.) data structure should be:
<root>
<Config>
<Item>
<Name>first</Name>
<Parameter>5</Parameter>
<Parameter>2</Parameter>
</Item>
<Item>
<Name>second</Name>
<Parameter>3</Parameter>
<Parameter>4</Parameter>
</Item>
</Config>
</root>
More information about the xsde-users
mailing list