We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsWebsite,  Documentation,  Book Bugs › reference for XMLElement missing import statement
Page Index Toggle Pages: 1
reference for XMLElement missing import statement (Read 2129 times)
reference for XMLElement missing import statement
Jan 25th, 2009, 11:30pm
 
just noticed that
http://processing.org/reference/XMLElement.html

is missing
import processing.xml.*;

that's all.

-e
Re: reference for XMLElement missing import statem
Reply #1 - Feb 27th, 2009, 3:48am
 
You don't need to import XML anymore, the XMLElement class is a part of Processing now. I saw that some other reference examples were still importing, I'm removing it from those.
Re: reference for XMLElement missing import statem
Reply #2 - Mar 2nd, 2009, 7:52am
 
well, I cannot get this to work either way; I get an error (below). I'd love some help because I wanted to teach XML parsing to my class...



Invalid input: `?' (0xfffd), SystemID='file:.', Line=1
at processing.xml.XMLUtil.errorInvalidInput(XMLUtil.java:513)
at processing.xml.StdXMLParser.scanData(StdXMLParser.java:239)
at processing.xml.StdXMLParser.parse(StdXMLParser.java:199)
at processing.xml.XMLElement.parseFromReader(XMLElement.java:235)
at processing.xml.XMLElement.<init>(XMLElement.java:212)
at parsingPractice.setup(parsingPractice.java:21)
at processing.core.PApplet.handleDraw(PApplet.java:1383)
at processing.core.PApplet.run(PApplet.java:1311)
at java.lang.Thread.run(Thread.java:613)


Re: reference for XMLElement missing import statem
Reply #3 - Mar 2nd, 2009, 11:52am
 
FFFD looks like an Unicode BOM, no?
AFAIK, no XML parsers for Processing handle Unicode, not even code pages, only plain Ascii.
If your XML is Unicode by accident (eg. saved in Windows' Notepad with default settings), just re-save in plain Ascii.
Otherwise, use Java's XML reading capabilities.
Re: reference for XMLElement missing import statem
Reply #4 - Mar 2nd, 2009, 6:24pm
 
oh my goodness! I saved it in textedit on a mac, and yes it was saved in unicode! I had to go into WORD and save as text only! Thank you SO much for your help! (and I'm embarrassed, I really should have known better!)

Thanks again!

Rose
Page Index Toggle Pages: 1