CookXml

Open Source bind tool that you can use
Download

CookXml Ranking & Summary

Advertisement

  • Rating:
  • Publisher Name:
  • Heng Yuan
  • File Size:
  • 143 KB

CookXml Tags


CookXml Description

CookXml is a powerful general purpose dynamic XML data binding tool. It is designed to be easy to use and easily extensible. The current implementation only does the unmarshaling. The marshaling aspect will be added. CookXml unmarshals objects from XML using an interpretation approach. It loads user defined tag libraries at runtime to convert XML documents into Java objects. The result is a highly configurable XML parser. Thus, it is not only great for XML data binding, it is also useful in creating parsers for scripts written in XML. In fact, I use this approach to create many small parsers at work. CookXml uses a set of delegates which are creators (object factories), setters, adders, and converters, to interpret the XML. These delegates together forms a tag library. To use CookXml, one usually creates a tag library which controls how objects are created, modified, and linked together. Objects are created using factory objects whenever a tag is encountered. Their properties are in turn set when an attribute is seen, usually through default setter functions. Objects can be added to their parent objects in prefix or postfix order. Most things can be done using default constructor for the object, variables/setter functions, and an add function. So it is simple to write a tag library. CookXml is designed to be easily extensible. If you create a new Java class, say MySlider based on JSlider, which is already in CookSwing tag library, you can create the new tag with much less effort, by telling Swing tag library that inherits . Instantly, inherits all the efforts you put in setting 's attributes (notably dozens of Swing listeners related attributes), adding children, etc (well, probably just one or two lines of code using CookXml anyways, but still you are worry free from implementation changes I would make toward .). Although CookXml with certain tag libraries can be powerful enough to turn XML into a complete language that can do pretty much anything doable in Java, there is no point in doing so. My view on XML is that it serves as an excellent tool for headers, configuration files, XUL, communication protocols, and to some extent data storage. CookXml excels in dealing all these. I use CookXml extensively for personal and work related projects. For 90% of XML related parsing (not including XUL), I found that using CookXml is faster/easier to write. For the rest 10%, mostly query results in XML which contain a lot of different ignored tags/fields, I found direct DOM tree parsing can be faster/simpler. Then again, maybe it is just me that I dislike having to learn dozens of different XML libraries for the very tiny fraction of features I would be interested in.


CookXml Related Software