You can modify the org.jibx.runtime.impl.UnmarshallingContext source (from the build/src directory tree in the distribution) to disable namespace processing by the parser. There's a method createParser() that includes a line:

s_factory.setNamespaceAware(true);

near the end. Change the "true" to "false", or just comment out this line completely. You can then just build using Ant (just running "ant" with no target will rebuild the jars - if you try running the tests, those using namespaces will fail).

It looks like this should work. I'm not ready to guarantee that it'll be supported in the future, but add it as an enhancement request to the list of issues in Jira if you want to remind me.

- Dennis

Q. Werty wrote:

Hi,

I've got to process an XML document with "prefix like" node
but without namespace.

This document looks like :
<app:main>
 <app:conf>.....</app:conf>
 ...
</app:main>
where "app:main" is the name of the node but app is NOT a prefix.
I know this is a bad practice but thoses documents are send to
us by third parties and we can modify them.

Jibx complains about prefix (app) not defined in any namespace
(which is right for namespace but "app" is NOT a prefix). So I
have thow solutions :

1. I can pre-process my xml document to add a real namespace
associated with this "pseudo-prefix" : it would certainly be
functionnal but I'd like to avoid this pre-processing time.
2. I'd like to be able to inform jibx that my document is
wihthout namespace, so it doesn't try to split app:main in
prefix=app and name=main but process the whole name
"app:main". IS IT POSSIBLE?






------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to