Just figured this one out, was reading this Cool Solution:

'Cool Solutions: Converting Strings to Nodesets'

And have converted it into ECMAScript:

function Parse(InString)
var nodeSet = new Packages.com.novell.xml.xpath.NodeSet();
var factory =
Packages.com.novell.xml.parser.XMLParserFactory.ne wParser();
var stringreader = Packages.java.io.StringReader;
var strinput = new stringreader(InString);
var doc = factory.parse(strinput);
return nodeSet;

Using this example:

Which does this:

// Initialize DOM API
var factory = Packages.javax.xml.parsers.DocumentBuilderFactory.
var builder = factory.newDocumentBuilder();
var stringreader = Packages.java.io.StringReader;
var strinput = new stringreader(softtable);
var inputsource = new Packages.org.xml.sax.InputSource(strinput);
var doc = builder.parse(inputsource);

Causes me to get an exception in Designer Simulate of
"java.lang.ClassCastException: com.novell.xml.xpath.XPathAttributeNode
cannot be cast to org.w3c.dom.Attr"

What I was trying to do, was Convert a XML string I had in ECMAScript
to a NodeSet that I could return back to Policy Builder and then do
stuff with it in Policy Builder.

Using Packages.com.novell.xml.parser.XMLParserFactory.ne wParser() works

Hope other people find this helpful.

peter_lambrechtsen's Profile: http://forums.novell.com/member.php?userid=56168
View this thread: http://forums.novell.com/showthread.php?t=429352