Tivoli Directory Integrator, Version 7.1.1

DSMLv1 Parser

The DSMLv1 Parser reads and writes XML documents. The Parser silently ignores schema entries.

Configuration

The Parser has the following parameters:

DN Attribute
The attribute used for the distinguished name DSML attribute ($dn).
DSML prefix
Prefix used on XML elements to indicate that they belong to the DSML namespace. Default is dsml.
DSML namespace URI
The URI which identifies this namespace. Default is http://www.dsml.org/DSML.
Omit XML Declaration
If checked, the XML declaration is omitted in the output stream.
Document Validation
If checked, this parser requests a DTD/Schema-validating parser.
Namespace Aware
If checked, this parser requests a namespace-aware parser.
Character Encoding
Character Encoding to be used.

This Parser extends the Simple XML Parser; therefore, the same notices with regards to Character Encoding apply.

Detailed Log
If this parameter is checked, more detailed log messages are generated.

Examples

The following example shows how you can generate DSML documents dynamically:

var dsml = system.getParser ( "ibmdi.DSML" );
var entry = system.newEntry();
entry.setAttribute ("$dn", "uid=johnd,o=doe.com");
entry.setAttribute ("mail", "john@doe.com");
entry.setAttribute ("uid", "johnd");
entry.setAttribute ("objectclass", "top");
entry.addAttributeValue ("objectclass", "person");
dsml.setOutputStream ( new java.io.StringWriter() );
// Uncomment if you dont want the "<?xml version= ...." header
// dsml.setOmitXMLDeclaration ( true );
dsml.initParser();
dsml.writeEntry ( entry );
dsml.closeParser();
var result = dsml.getXML();
task.logmsg ( result );

The following example shows how you can read a DSML document using script:

var dsml = system.getParser ("ibmdi.DSML");
dsml.setInputStream ( new java.io.FileInputStream("dirdata.dsml") );
dsml.initParser ();
var entry = dsml.readEntry();
while ( entry != null ) {
	task.dumpEntry ( entry );
	entry = dsml.readEntry();
}

See also

Simple XML Parser,
SOAP Parser,
DSMLv2 Parser.
[ Top of Page | Previous Page | Next Page | Contents | Terms of use | Feedback ]
(C) Copyright IBM Corporation, 2003, 2012. All Rights Reserved.
IBM Tivoli Directory Integrator 7.1.1