Using UA 3.7

I've been trying to transform an XML string variable to a DOM object
with not much success. I found few threads here on the topic but none
really provide the solution. Here is my steps (I'm not a java programmer
so I may be missing something simple but I tried a lot of different

Here is the XML attribute value:
<?xml version="1.0" encoding="UTF-8"?>
<col-def name="Item Name" type="nocase"/>
<col-def name="Description" type="nocase"/>
<col>MS Word 2003</col>
<col>Microsoft Word Processing application</col>
<col>Firefox 3</col>
<col>Internet Browser</col>

And, a function in Pre-Activity:

// Read an attribute type XMLData from a Custom object in Edir to a
variable (it works fine) -
var tabledn = "cn=software01,ou=RefInfo,o=bc";
var softtable = IDVault.get(tabledn, 'bcRefTable','bcXmlData');
// Initialize DocBuilder:
var factory =
Packages.javax.xml.parsers.DocumentBuilderFactory. newInstance();
var builder = factory.newDocumentBuilder();
// Initialize Source Reader:
var stringreader = new Packages.java.io.StringReader(softtable);
var inputsource = new Packages.org.xml.sax.InputSource(stringreader);
// Parse the XML string and print out the first element
var doc = builder.parse(inputsource);
Packages.java.lang.System.out.println("Reader = " +

It looks like the DOM object is created (no errors) but it's null. So,
it looks like the StringReader doesn't actually read the XML input.

Any help or ideas are appreciated since this is a simple way of reading
any data in XML format such as mapping tables, etc. and the XMLData
attribute can be updated by the clients via iManager without having to
use the Designer.


slavat's Profile: http://forums.novell.com/member.php?userid=4095
View this thread: http://forums.novell.com/showthread.php?t=396307