473,221 Members | 2,136 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,221 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 1477
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....
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.