Coder Social home page Coder Social logo

Comments (14)

amouat avatar amouat commented on August 19, 2024

Err, those don't look like XML documents?

from diffxml.

meshkin avatar meshkin commented on August 19, 2024

the documents are xml.
the error caused by xml:id attribute!
assume bellow docs:
doc1 => 'new'
doc2 => 'yyfghdffdg'

from diffxml.

meshkin avatar meshkin commented on August 19, 2024

please see source of my comments, my xml struct are shown in it.

from diffxml.

amouat avatar amouat commented on August 19, 2024

Hmm, this works for me:

$ cat t1.xml
<body><span >new</span></body>
$ cat t2.xml
<body><p><span>doc<span xml:id="tan_87c69qu3evta">dd</span>ff</span></p></body>
$ ./diffxml.sh t1.xml t2.xml 
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<delta xmlns="http://www.adrianmouat.com/dul">
<insert childno="1" name="p" nodetype="1" ns="" parent="/node()[1]"/>
<move childno="1" new_charpos="1" node="/node()[1]/node()[2]" old_charpos="1" parent="/node()[1]/node()[1]"/>
<insert childno="1" nodetype="3" parent="/node()[1]/node()[1]/node()[1]">doc</insert>
<insert charpos="4" childno="2" name="span" nodetype="1" ns="" parent="/node()[1]/node()[1]/node()[1]"/>
<insert name="id" nodetype="2" ns="http://www.w3.org/XML/1998/namespace" parent="/node()[1]/node()[1]/node()[1]/node()[2]">tan_87c69qu3evta</insert>
<insert childno="3" nodetype="3" parent="/node()[1]/node()[1]/node()[1]">ff</insert>
<insert childno="1" nodetype="3" parent="/node()[1]/node()[1]/node()[1]/node()[2]">dd</insert>
<delete charpos="3" length="3" node="/node()[1]/node()[1]/node()[1]/node()[3]"/>

Can you please let me know which version of Java and diffxml you're using?

from diffxml.

meshkin avatar meshkin commented on August 19, 2024

my java version:
openjdk version "1.8.0_60"
OpenJDK Runtime Environment (build 1.8.0_60-b27)
OpenJDK 64-Bit Server VM (build 25.60-b23, mixed mode)
and cloned the latest version of diffxml.
when I run "./diffxml.sh test1a.xml test2a.xml", got the bellow error:
Error: Could not find or load main class org.diffxml.diffxml.DiffXML

from diffxml.

amouat avatar amouat commented on August 19, 2024

So how were you running it before?

You need to build the code if you grab it from source:

$ ant jarDiffXML

That should have been explained in the README, sorry.

from diffxml.

meshkin avatar meshkin commented on August 19, 2024

I download your source and edit the java/org/diffxml/diffxml file and add following line end of Diff interface:
Document diff(final Document f1, final Document f2) throws DiffException;
then I build the source and make the jar file. the link : (http://www.mediafire.com/download/0xfdvp7kxkajdwc/diffxml.zip)
then I use it in my other projects. in all of cases work very good, but when one of docs has xml:* the above error throw.

from diffxml.

meshkin avatar meshkin commented on August 19, 2024

ant jarDiffXML
Buildfile: /home/masoud/diffxml-master/build.xml

buildDirStructure:

compileDiffXML:
[javac] /home/masoud/diffxml-master/build.xml:74: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 39 source files to /home/masoud/diffxml-master/build

BUILD FAILED
/home/masoud/diffxml-master/build.xml:74: /home/masoud/diffxml-master/lib does not exist.

Total time: 0 seconds

from diffxml.

amouat avatar amouat commented on August 19, 2024

That's a bug. I think I need to upload the libs. It would be better to use Maven or something, but I don't have time for that.

from diffxml.

meshkin avatar meshkin commented on August 19, 2024

yes, it works by diffxml.sh.
I have a question, and it is : why you didn't add the following line to Diff.xml?
Document diff(final Document f1, final Document f2) throws DiffException;

from diffxml.

amouat avatar amouat commented on August 19, 2024

I'm afraid I really don't understand the question. Can I close this? It seems it works.

from diffxml.

meshkin avatar meshkin commented on August 19, 2024

Ok, however thanks for your useful module and your helps.

from diffxml.

amouat avatar amouat commented on August 19, 2024

No problem. I'm glad you're finding a use for it.

from diffxml.

waiphyoMaung1990 avatar waiphyoMaung1990 commented on August 19, 2024

I aslo have a problem in below-
org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
at java.xml/com.sun.org.apache.xerces.internal.dom.ElementNSImpl.setPrefix(ElementNSImpl.java:279)
at com.sun.xml.messaging.saaj.soap.impl.ElementImpl.setPrefix(ElementImpl.java:252)
at org.netbeans.modules.websvc.design.javamodel.Utils.setSoapRequest(Utils.java:575)
at org.netbeans.modules.websvc.design.javamodel.Utils.populateOperation(Utils.java:497)
at org.netbeans.modules.websvc.design.javamodel.Utils.access$100(Utils.java:109)
at org.netbeans.modules.websvc.design.javamodel.Utils$1.run(Utils.java:352)
at org.netbeans.modules.websvc.design.javamodel.Utils$1.run(Utils.java:173)
at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:504)
at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:132)
at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:116)
at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
at org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.runWhenScanFinished(RunWhenScanFinishedSupport.java:123)
at org.netbeans.modules.parsing.api.ParserManager.parseWhenScanFinished(ParserManager.java:109)
at org.netbeans.api.java.source.JavaSource.runWhenScanFinished(JavaSource.java:630)
at org.netbeans.modules.websvc.design.javamodel.Utils.populateModel(Utils.java:366)
at org.netbeans.modules.websvc.design.javamodel.ServiceModel.populateModel(ServiceModel.java:360)
at org.netbeans.modules.websvc.design.javamodel.ServiceModel.(ServiceModel.java:76)
at org.netbeans.modules.websvc.design.javamodel.ServiceModel.getServiceModel(ServiceModel.java:83)
at org.netbeans.modules.websvc.design.navigator.WSDesignViewNavigatorContent$WSChildFactory.createKeys(WSDesignViewNavigatorContent.java:103)
at org.openide.nodes.AsynchChildren.run(AsynchChildren.java:202)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

from diffxml.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.