IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

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 this a Content Node or Not ?

    Posted Mon May 27, 2002 04:06 PM

    Hello,
    I have an xs:string node in my Schema and its minOccurs=0,maxOccurs=1.
    In xapplication (in one of my tags which extends JspTag) I get this node from BusinessDocument with the getChild() method.
    When I call the isContentNode() method of this node it returns False !!!
    But I think it should return True.
    Am I right or not ?

    myMD = sessionContext.getDocument(“currentHasta”);

    BusinessNode bd=null;
    BusinessNode tempNode =null;

    bd = myMD.getDescendant(“/Hasta/Vaka[0]”);
    for (int k=0;k<bd.getChild(0).getChildCount();k++) {
    tempNode = bd.getChild(0).getChild(k);
    if(tempNode.isContentNode) {
    System.out.println("This Node is content Node…: " + tempNode.toXML() );
    }
    }


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: Is this a Content Node or Not ?

    Posted Mon May 27, 2002 05:02 PM

    Hello MehmetServer,

    to address your problem thoroughly we need to have the corresponding schema defintion. Please attach it to a new reply.

    Thank you for your contribution

    Stefan Schwalm
    Software AG, Darmstadt


    #Tamino
    #webMethods
    #API-Management


  • 3.  RE: Is this a Content Node or Not ?

    Posted Tue May 28, 2002 10:34 AM

    I suppose that getChild(k) returns a structure node (OccurrenceNode, ChoiceNode or SequenceNode)and the node you want to check with isContentNode is a child of the structure node.

    What do you get if you insert a
    System.println(“” + getChild(k).getClass())
    into you loop?


    Michael

    Software AG Germany, Darmstadt


    #webMethods
    #Tamino
    #API-Management