FiXMLTable of ContentsDownloads
Wget4Xsd Xml Schema Downloader

Wget4Xsd - XML Schema Download Utility

Wget4Xsd.exe is an http utility that downloads a tree of XML Schema (XSD) files to a local directory with one command. XML schema files can include, import, redefine other XSD files to define a XML Schema model. In many cases, the users feel the need to download XML Schemas and use them locally. This typically requires the user to download the main file, then open it and find which files the schema includes, imports, redefines. Then create necessary directory structure manually. Then download the included files into those directories, open each one and repeat the above process for each file. This manual process can get error prone very quickly. Maybe 2-3 files are manageable. But when you have 10 - 20 files, or 1000 files, manual approach is not scalable.

We at Bestcode felt the need to create a utility that will automate the above process. Wget4xsd is a time saver which will let you provide the XSD url (-url) to download and a directory (-dir) to save the files into. Wget4xsd downloads the xsd found at the given url, parses it and discovers include, import, and redefine schema locations. Then it creates the local directory structures to save the files as needed and eventually traverses the entire XSD file tree and saves a local copy ready to use. This is very similar to the well known wget command to download http / html / ftp resources. Wget4Xsd understands the XML Schema structure and downloads necessary pieces.

Usage:

Wget4Xsd.exe -url xmlSchemaUrl and -dir dirName

Below is an example use where we quickly download the web application schema ( http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd ) from Sun Microsystems web site including all the dependencies.

Wget4Xsd.exe -url http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd -dir webapp_xsd

Downloading http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd to webapp_xsd\

Downloading http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd to webapp_xsd\j2ee_1_4.xsd

Downloading http://www.w3.org/2001/xml.xsd to webapp_xsd\j2ee_1_4.xsd\www.w3.org\2001\

Downloading http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd to webapp_xsd\j2ee_1_4.xsd\www.ibm.com\webservices\xsd\

Downloading http://java.sun.com/xml/ns/j2ee/jsp_2_0.xsd to webapp_xsd\jsp_2_0.xsd

Downloading http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd to webapp_xsd\jsp_2_0.xsd\j2ee_1_4.xsd

Downloading http://www.w3.org/2001/xml.xsd to webapp_xsd\jsp_2_0.xsd\j2ee_1_4.xsd\www.w3.org\2001\

Downloading http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd to webapp_xsd\jsp_2_0.xsd\j2ee_1_4.xsd\www.ibm.com\webservices\xsd\

Here is the screen shot:

Download XML Schema Easily at Once

Here is the output directories that are created and files downloaded:

Many XML Schema Files Downloaded with one command - Wget4Xsd

Wget4Xsd runs on Windows and requires .NET Framework 2.0

Wget4Xsd.exe is part of Bestcode File Utilities tool set.

 

webmaster@bestcode.com