Tuesday, December 29, 2009

Inferring XSD from XML documents

It seems that every place I've worked at has used XML documents to organize information. At my current place of employment, we use XML documents for various things. Lately, I've been working in the world of XML without any predefined XSD or DTD to verify the XML against. This isn't necessarily a problem in our case because we are the only consumers of the documents.

Recently, I've been tasked with using some of the files. I remember previously running into a tool for inferring schema documents from XML. I had to jog my memory a little to find it, but I found it. The tool is called Trang. It's a great way to see a description of what the XML generalizes to. After you download the jar, you can run it like so:

java -jar trang.jar *.xml testing.xsd

This will examine all the XML files in the current directory and create a file named 'testing.xsd'.

This is also a great for coming up with the schema by creating example XML files. After the schema is generated you can go in a tweak it if you need to.

Saturday, December 5, 2009

sailfish 50 miles northeast of Isla Mujeres

I can across this great article on sailfish today. I didn't realize that sailfish hunt in packs. The article's pretty short and the pictures are amazing. Thank you National Geographic.

http://ngm.nationalgeographic.com/2008/09/sailfish/holland-text