Link to home
Start Free TrialLog in
Avatar of paddykool
paddykool

asked on

XML comparison failing on namespace URI not being mapped to any prefix

Hi all,
I have a little XML comparison tool called 'diffx'. I run it from the command line and when I give it 2 XML files it throws an exception stating:-
"namespace URI . . . has not been mapped to any prefix"
Can any one please take a look at the tool and see how I can get it to avoid this
Below is the two lines of XML it is comparing and the entire error message.
Many thanks in advance!!!

Error Message:-
                                            <executionDateTime><ins>2010-04-19T04:15:55Z</ins><del>201
0-03-24T16:51:46Z</del></executionDateTime>
                                com.topologi.diffx.xml.UndeclaredNamespaceException: The n
amespace URI "http://www.xxxx.org/2007/FpML-4" has not been mapped to any prefix.
        at com.topologi.diffx.xml.NSAwareXMLWriter.getQName(NSAwareXMLWriter.java:599)
        at com.topologi.diffx.xml.NSAwareXMLWriter.openElement(NSAwareXMLWriter.java:373)
        at com.topologi.diffx.event.impl.OpenElementEventNSImpl.toXML(OpenElementEventNSIm
pl.java:214)
        at com.topologi.diffx.format.SmartXMLFormatter.format(SmartXMLFormatter.java:203)
        at com.topologi.diffx.algorithm.DiffXFitopsy.process(DiffXFitopsy.java:304)
        at com.topologi.diffx.Main.diff(Main.java:314)
        at com.topologi.diffx.Main.diff(Main.java:289)
        at com.topologi.diffx.Main.main(Main.java:332)

XML lines that it is comparing:-
<trade xmlns="http://www.xxxx.org/2007/FpML-4">    (its the same in both XMl files)
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Can you delete your duplicate you posted first?
Avatar of paddykool
paddykool

ASKER

Opps :(

Just realised that!!!
Apologies,  done
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
All over it!!!
Just got another little tool that does the trick.
Many thanks for your help today :)
:-)