webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  is the BasicDocument class abstract ???

    Posted Tue November 13, 2001 11:16 AM

    I can’t instantiate the class com.docuverse.dom.BasicDocument : my compiler says that it’s an abstract class while it is defined as a non-abstract class in the javadoc…

    PS : I have the same problem with BasicText and BasicElement.


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 2.  RE: is the BasicDocument class abstract ???

    Posted Tue November 13, 2001 04:21 PM

    With the following classpath (from Tamino 2311):

    set classpath=C:\Tamino\Bin\domsdk.jar;
    set classpath=%classpath%;C:\Tamino\Bin\w3cdom1.jar;
    set classpath=%classpath%;C\Tamino\Tamino\Bin\sax.jar;

    This code works for me:

    code:

    import com.docuverse.dom.BasicDocument;
    import com.docuverse.dom.BasicText;
    import com.docuverse.dom.BasicElement;

    public class NewDocument {

    public static void main (String args) {

    System.out.println(“Creating new BasicDocument…”);
    BasicDocument myDoc = new BasicDocument();

    BasicElement myElement = new BasicElement(myDoc,“root”);
    BasicText myText = new BasicText(myDoc,“rootNodeValue”);

    myElement.appendChild(myText);
    myElement.setAttribute(“testAttribute”,“testValue”);

    myDoc.appendChild(myElement);

    System.out.println(“Document created: " + myDoc);
    System.out.println(”…Done!");

    }

    }



    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs