As part of Structure101 it is possible to output the structure spec to an image file and the violations to an xml file.

Example XML file to perform the operation:

<?xml version="1.0" encoding="UTF-8"?>
<headless version="1.0">
    <operations>
        <operation type="report-spec">
        	<argument name="output-file" value="c:/abc/report-xs.xml"/>
		<argument name="identifier-on-violation" value="build unstable"/>
        </operation>
    </operations>
    <arguments>
        <argument name="local-project" value="C:\Documents and Settings\user\project.java.hsp">
            <override attribute="classpath" value="C:\classes-to-parse"/>
        </argument>
    <argument project="project-with-diagrams-in-repository"/>
        <argument repository="path-to-repository"/>
    </arguments>
</headless>    
   

Available arguments include:

Argument Required Description
local-project no See project-spec.
output-file no File to which violations to the structure spec are written in XML format. An image representing the state of the Structure Spec is written into the same directory. This argument can be a relative or absolute path.
project yes project with a structure spec in repository.
repository yes The path to the Structure101 Studio repository root directory, e.g. c:/repository, /home/usr/x/repository, or, if remote, http://<servernameorip><:portno>/s101cpp/data.
identifier-on-violation no It can take any text. If this value is set to a text string then that text will be present in console output if a violation is found. This feature can be used in conjunction with Hudson or Jenkins (Textfinder plugin) to make the build unstable.
useProjectFileSpec no If set to true then the structure spec in the specified project file is used instead of the repository structure spec. Default value is false.
detailed no If detailed is set to “true”, then the list of elemental (lowest level) violations will be saved to output. If false violations will rolled up to the relevant cell level, e.g. package-to-package. Default value is false.
check-unassociated no If true and onlyNew is also set to true then it will check the baseline before reporting an item as unassociated otherwise it will report all unassociated items in the Structure Spec.

Important: Requires a valid license file in the current directory with a build license, or the -licensedirectory parameter to be set.