We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I am trying to use new XML class from Processing 2.0 when coding with Eclipse. I have some code that used to work fine, but I know XMLElement has been superseded by XML (confusing choice of name in my opinion), so my old
-import processing.xml.*;
-
is no longer necessary. I changed
public XMLElement scene;
to
public XML scene;
but Eclipse keeps saying this is an error, and that 'XML cannot be resolved to a type'
I tried PApplet.XML but this doesn't help the issue. Here's the minimal code that shows the issue
package protest1;
import processing.core.*;
public class Protest1 extends PApplet {
XML test; // CANNOT RESOLVE
}
Is there any special way I need to declare my XML objects now? I don't want to hold on for 1.5.1 for much longer and that's the only thing that is holding me back
Answers
The new package name is
processing.data.XML
. You must import this class. You may find that some of the methods have changed as well, so you should check the reference page.That solved the issue, thanks