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.


Wget4Xsd.exe -url xmlSchemaUrl and -dir dirName

Below is an example use where we quickly download the web application schema ( ) from Sun Microsystems web site including all the dependencies.

Wget4Xsd.exe -url -dir webapp_xsd

Downloading to webapp_xsd\

Downloading to webapp_xsd\j2ee_1_4.xsd

Downloading to webapp_xsd\j2ee_1_4.xsd\\2001\

Downloading to webapp_xsd\j2ee_1_4.xsd\\webservices\xsd\

Downloading to webapp_xsd\jsp_2_0.xsd

Downloading to webapp_xsd\jsp_2_0.xsd\j2ee_1_4.xsd

Downloading to webapp_xsd\jsp_2_0.xsd\j2ee_1_4.xsd\\2001\

Downloading to webapp_xsd\jsp_2_0.xsd\j2ee_1_4.xsd\\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.