473,324 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

tool to fix non-conforming xml?


hi all,

i'm working on a project where i'm marshalling xml files to java
objects created with JAXB 1.0 from an xsd schema. the problem is that
the marshalling fails (UnexpectedElementException) when it hits an
element that is not defined in the schema -- and the process that
produces the xml sometimes includes such elements. Upgrading to JAXB
2.0 is not an option, unfortunately.

so, my question: is there a tool, commercial or not, which fixes
non-conforming xml by supplying defaults for missing elements
and by stripping elements not defined in the schema?

thanks in advance for any help.
peter

Feb 5 '06 #1
2 1488
Not an xml expert by far, but couldnt you develop a simple XSL
stylesheet / transform your input XML files to a verified output? I.e.
transform all given input xml files to your output defined by the
scheme, any elements not defined in the schema are simply igored in the
stylesheet / transformation process.

Feb 5 '06 #2
"Validate twice with surgery" is the informal name of a technique
which will do exactly what you are looking for.

There's a writeup of a talk about this from XML Europe 2004 available
[1], and a free demo of a pipeline-based implementation which you can
try with your own document and schema [2].

ht

[1] http://www.markup.co.uk/XMLEu2004/
[2] http://www.markup.co.uk/showcase/
--
Henry S. Thompson, Markup Technology Ltd.
4 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- +44 (0) 7866 471 388
Fax: (44) 131 650-4587, e-mail: ht@markuptechnology.com
URL: http://www.markup.co.uk/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Feb 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: vincent_delft | last post by:
I've a simple python script that read a directory and put the files into a Zip file. I'm using the os.walk method to get the directory content, I'm creating ZipInfo objects and set "filename",...
2
by: Christopher Johannsen | last post by:
Good Day: I am working on building a tool Using ASP/COM & IIS5.1 for a non-administrative technical support team to change domain passwords for users. I have the basic interface built and...
6
by: d.warnermurray | last post by:
I am doing a project for school that involves creating help files for a html authoring tool. If you could help me with answers to some questions it would really help. 1. What tasks do you expect...
4
by: Dave | last post by:
I need to add the ability to drag from a Windows Form and drop into a non dotNet application. For example, having a generated image in my app that I wish to drag out into explorer as a friendly way...
2
by: Christoph Wienands | last post by:
Hello everybody, a while ago on one of the "big" DotNet websites (like GotDotNet) I stumbled across a description of a tool that enables developers to work with features like "Declarative...
17
by: clintonG | last post by:
I'm using an .aspx tool I found at but as nice as the interface is I think I need to consider using others. Some can generate C# I understand. Your preferences please... <%= Clinton Gallagher ...
158
by: Giovanni Bajo | last post by:
Hello, I just read this mail by Brett Cannon: http://mail.python.org/pipermail/python-dev/2006-October/069139.html where the "PSF infrastracture committee", after weeks of evaluation, recommends...
0
by: amitvps | last post by:
Secure Socket Layer is very important and useful for any web application but it brings some problems too with itself. Handling navigation between secure and non-secure pages is one of the cumbersome...
2
by: BD | last post by:
I'm working with a data model which is managed in the AllFusion ERwin tool. Within the modeler, some of the FK relationships are 'non-mandatory' - which is to say that for a given child value, a...
2
nayana kalkur
by: nayana kalkur | last post by:
Hi, I have developed a new tool window for my addin. I have added a user control to the tool window so that i can populate the output of some function in that data grid present in the tool window....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.