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.
Page Index Toggle Pages: 1
XML Library (Read 4894 times)
XML Library
May 13th, 2005, 11:54pm
 
Ben and I think Processing needs an XML Library. It's easy to use nanoxml in the code folder, but many people are not thinking in this way. It would be great to make it more obvious and have documentation.

Is anyone working on this or would anyone be willing to take it on?
Re: XML Library
Reply #1 - May 14th, 2005, 10:52am
 
Hi Casey

My proHtml library is able to handle XML. You can parse and build files. I don't know if there is anything missing I could implement it. I could also try to build a proXML library and exclude all the features from proHtml that are html specific and add writing of files. What do you think?
Re: XML Library
Reply #2 - May 14th, 2005, 2:56pm
 
i think an xml library would be a great idea since i've been using nanoxml a lot ...

tex,
what do you think about having some xpath functionality in a possible proXML ?

http://www.w3.org/TR/xpath

best,
F
Re: XML Library
Reply #3 - May 14th, 2005, 3:26pm
 
Hi fjen

Well xpath is possible, actually i spend quiet a lot time on this theme at university. The solution there was using generics. The problem is that I would definetly need some time for that, so this would have to wait. The other point is that xpath would make the whole library more complex and I am not sure how many people would use it.

I already startet with proXML infact it is just some cleaning of proHTML, to just focus on the XML specific points. I am adding file writing in the moment and then I will start with the documentation.
Re: XML Library
Reply #4 - May 14th, 2005, 3:47pm
 
yes, i guess it takes some time to implement xpath ... maybe a limited subset will do already:
http://processing.org/discourse/yabb/YaBB.cgi?board=Tools;action=display;num=1070627124;start=4

i think many beginners might find it more intuitive to say "/root[1]/node[1]/subnode[3]" than looping thru vectors/arrylists/arrays ...

best,
F

( looking foreward to use you lib Smiley )
Re: XML Library
Reply #5 - May 14th, 2005, 6:12pm
 
tex, sounds like a great plan. thank you. casey
Re: XML Library
Reply #6 - May 15th, 2005, 8:00pm
 
hey tex, another nice & important thing for a XML library would be namespace support, so that more complex types of XML data can be properly parsed and built too and the library could then be used a basis for more extensive/specific ones (e.g. SVG, RSS, RDF etc.) that shouldn't be too hard to implement either. not as hard as xpath by any means, that's for sure... Wink
Re: XML Library
Reply #7 - May 15th, 2005, 11:43pm
 
Hi

You are welcome to test the first version of proXML get it from:

http://www.texone.org/proxml.zip

The file contains the library as jar and the javadoc. So far it is not in the processing structure.

Please take look on the design of the lib. I tried to make it as simple as possible and a bit simular to nanoxml. Are there things you would change according the design?

What do you think of two versions, one reduced simular to the actual version and one with advanced features like xpath and namespaces?

Re: XML Library
Reply #8 - May 16th, 2005, 12:29am
 
Looks neat.  I'll try it with Flickr or del.icio.us at some point soon and let you know how I get on.

Any thoughts on how much work would it be to get this library to be Java 1.1 compatible?  How about using Vector and Hashtable?  I can provide more help once you've settled on your API.

I see you're using the List interface in places but not the Map interface, you're using HashMap.  Is there a specific reason for that?

One other thing - the jar file seems to have some html files in there.  Given the likely use of the library in applets, would it be possible to take those out?  Seems to drop the size from 32k to 9k here.

Good job though, very nice to have this.
Re: XML Library
Reply #9 - May 16th, 2005, 9:42am
 
I will try to make it 1.1 compatible. Of course the jar file will get smaller. I don't what eclipse was doing there yesterday. The reason for that early release was to give the people the chance of suggestions.
Re: XML Library
Reply #10 - May 16th, 2005, 10:41am
 
Excellent.

Apologies if I sounded overly critical up there.  This is great work!

Re: XML Library
Reply #11 - May 16th, 2005, 12:54pm
 
Oh no problem. I posted this stuff for being critical.

Here is the new version. I hope it is java 1.1 compatible. The jarfile is also cleaned now, it is in processing format includes source files and java doc.

The lib needs more testing, but everything I did so far worked.

Give it a try.

http://www.texone.org/proxml.zip
Page Index Toggle Pages: 1