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.
IndexProgramming Questions & HelpOther Libraries › simpleml-library: parsing xml
Page Index Toggle Pages: 1
simpleml-library: parsing xml (Read 1624 times)
simpleml-library: parsing xml
Sep 5th, 2007, 10:41am
 
hi,

i'm using shiffmans simpleml library to load xml-data from a web-source. in the libraries description ( http://www.shiffman.net/teaching/simpleml/ ) it says that processing's xml library can be used to parse the xml but i just can't figure out how. i get an XMLRequest Object which processings xml library can't process.

does anyone know how this is done? i know i could parse it with the methods provided with the simpleMl library, but the xml-parsing functionality of the simpleml library is very limited so i need to use the xml library to parse the xml.


code:

XMLRequest xreq = new XMLRequest(this,url);
   xreq.makeRequest();

void netEvent(XMLRequest ml) {
 println("server is responding");
}

Re: simpleml-library: parsing xml
Reply #1 - Sep 5th, 2007, 1:26pm
 
Unfortunately, you cannot use the SimpleML's XMLRequest object with the Processing XML library; they are not compatible.  So yes, because SimpleML is only useful for very simple XML retrieval, you should use the Processing XML library instead and create an XMLElement object.

Code:

xml = new XMLElement(this, url);


http://processing.org/reference/libraries/xml/
Page Index Toggle Pages: 1