Package org.exolab.castor.types

Examples of org.exolab.castor.types.AnyNode


        if (_nodeStack.empty()) {
            _startingNode.addChild(_node);
            _node = _startingNode;
        }
        else {
            AnyNode previousNode = (AnyNode) _nodeStack.peek();
            previousNode.addChild(_node);
            //--the node processing is finished -> come back to the previous node
            _node = previousNode;
         }
    }
View Full Code Here


        String temp = new String(ch, start, length);
        //skip whitespaces
        if (isWhitespace(temp) & !_character)
            return;
        else {
            AnyNode tempNode = new AnyNode(AnyNode.TEXT, null, null, null, temp);
            _node.addChild(tempNode);
           _character = true;
        }
    }
View Full Code Here

            prefix = qName.substring(0,qName.indexOf(':'));

        //creates the starting ELEMENT node
        //or a default ELEMENT node
        if ( (_nodeStack.empty()) && (_startingNode == null)) {
           _startingNode = new AnyNode(AnyNode.ELEMENT, localName, prefix, namespaceURI, null);
           _node = _startingNode;
        } else {
          _node = new AnyNode(AnyNode.ELEMENT, localName, prefix, namespaceURI, null);
          //push the node in the stack
          _nodeStack.push(_node);
        }
   }
View Full Code Here

     * @param buffer the StringBuffer to append to.
     */
    static final void getStringValue(AnyNode node, StringBuffer buffer) {
        switch(node.getNodeType()) {
            case AnyNode.ELEMENT:
                AnyNode child = node.getFirstChild();
                while (child != null) {
                    getStringValue(child, buffer);
                    child = child.getNextSibling();
                }
                break;
            case AnyNode.TEXT:
                buffer.append(node.getStringValue());
                break;
View Full Code Here

TOP

Related Classes of org.exolab.castor.types.AnyNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.