		Reading License Keys From Exported Keys
		---------------------------------------

The License Manager GUI publishes keys in a number of formats.
The specific format that is applicable to your context depends
on your objectives.  The following notes are intended to help
you understand the choices so you can make an informed
decision, as well as to illustrate typical usage scenarios
with sample code.

Key formats
-----------

	Details of the specific formats are available in the 
	License Manager User Guide document. 

	.txt:
		This is a report intended for human readability by
		an individual assigned the role of administering keys
		and managing software assets.
	.csv:
		The comma-separated values are designed for importing
		into spreadsheets and database management systems.
	.tab:
		Similar to .csv, except that the separator is a tab
		character.
	.xml:
		The key and its associated information is in XML format,
		and is designed for automated processing, for example
		email-merge.
	.key:
		Just the keys are contained, with no accompanying formatting
		or information.  It is designed for single-key distribution
		to applications that expect to read the key from a file 
		without having to resort to extraneous coding.
	.ini:
		The keys are contained in a name-value pair format.  It is
		designed for single-key distribution to applications that
		expect to read a property file.

Reading a published file
------------------------

	Source code for reading any of the formats to extract a key 
	value into an application is included as part of the Java / C 
	demo programs "jdemo.java" and "C_Demo.c".

	Here are a few more ways to read a file for a broader range
	of purposes:

    Extracting keys from an XML file for XSLT processing:
	-----------------------------------------------------

     	<xsl:for-each select="/key-list/key">
		<xsl:variable name="keyvalue">
     	    		<xsl:value-of select="."/>
		</xsl:variable>
		:
		<!-- do something with the key contained in keyvalue -->
		:
     	</xsl:for-each>

	Extracting keys from an XML file for processing in Java:
	(the following code assumes JDK 1.4)
	--------------------------------------------------------

		DocumentBuilderFactory dbf =
 			DocumentBuilderFactory.newInstance();
     	DocumentBuilder db = dbf.newDocumentBuilder();
     	org.w3c.dom.Document doc =
     		db.parse(new StringBufferInputStream(xmlstring));
     	org.w3c.dom.Element docRoot = doc.getDocumentElement();
		NodeList keys = rootElement.getElementsbyTagName("key");
		for (int i = 0; i < keys.getLength(); i++) {
			NodeList textNodes = keys.getChildNodes();
         	String keytxt = "";
         	for (int j = 0; j < textNodes.getLength(); j++) {
				Node child = textNodes.item(j);
				if (child.getNodeType() == Node.TEXT_NODE)
					keytxt += child.getNodeValue();
			}
			// then do whatever needs to be done with keytxt
		}

	Extracting the keys from a csv file for processing in Java:
	-----------------------------------------------------------

     	for each line of input text from the csv file:
     	  keytxt = linetxt.substring(
     	             linetxt.lastIndexOf((int)',')+1);

	Reading a property file and extracting the license key:
	-------------------------------------------------------

		import java.util.Properties;
		:
		Properties props = new Properties();
		props.load(new FileInputStream(propertyFileName);
		:
		String licenseKey=props.getProperty("licenseKey");


				-x-
