2 Replies Latest reply on Nov 18, 2011 9:36 AM by jscotti

    get string from XML

    jscotti Level 1

      I have the following in an execute script. It creates an XML quite nicely. However, I need it to retrieve the data for comparison versus creating an XML. Is there an easy way to convert what I have so this can be accomplished? I need to compare the commonName to a string value that will be static, and store the userId that corresponds to it as a string. 



      DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance();
      DocumentBuilder bd = fact.newDocumentBuilder();
      Document doc = bd.newDocument();
      Element root = (Element) doc.createElement("users");

      if(userlist != null)
      Iterator iterator = userlist.iterator();
      while ( iterator.hasNext() )
        User eachUser = (User)iterator.next();

        Element UserNode = doc.createElement("user");

        Element ValueNode = doc.createElement("userID");


        Element ValueNode = doc.createElement("commonName");

      patExecContext.setProcessDataValue("/process_data/uXML", (Object)doc)