Package com.dtrules.mapping

Examples of com.dtrules.mapping.XMLNode


      @Override
            public void execute(DTState state) throws RulesException {
        IRObject  value     = state.datapop();
        IRObject  attribute = state.datapop();
        XMLNode   xmlNode   = state.datapop().xmlTagValue();
        if(xmlNode != null){
            state.traceInfo("SetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute.stringValue(),"value",value.stringValue(), null);
            xmlNode.getAttribs().put(attribute.stringValue(), value.stringValue());
        }
      }
View Full Code Here


            GetXmlAttribute(){super("getxmlattribute");}

            @Override
            public void execute(DTState state) throws RulesException {
                String    attribute = state.datapop().stringValue();
                XMLNode   xmlNode    = state.datapop().xmlTagValue();
                if(xmlNode == null) {
                    state.datapush(RNull.getRNull());
                    state.traceInfo("GetXmlAttribute","tag","nullTag","attribute",attribute,"value","null",null);
                    return;
                }
                String    value     = (String) xmlNode.getAttribs().get(attribute);
                if(value != null ){
                   state.datapush(RString.newRString(value));
                   state.traceInfo("GetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute,"value",value,null);
                }else{
                   state.datapush(RNull.getRNull());
                   state.traceInfo("GetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute,"null","true",null);
                }
            }
View Full Code Here

      @Override
            public void arrayExecute(DTState state) throws RulesException {
        IRObject  value     = state.datapop();
        IRObject  attribute = state.datapop();
        XMLNode   xmlNode   = state.datapop().xmlTagValue();
        if(xmlNode != null){
            state.traceInfo("SetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute.stringValue(),"value",value.stringValue(), null);
            xmlNode.getAttribs().put(attribute.stringValue(), value.stringValue());
        }
      }
View Full Code Here

            GetXmlAttribute(){super("getxmlattribute");}

            @Override
            public void arrayExecute(DTState state) throws RulesException {
                String    attribute = state.datapop().stringValue();
                XMLNode   xmlNode    = state.datapop().xmlTagValue();
                if(xmlNode == null) {
                    state.datapush(RNull.getRNull());
                    state.traceInfo("GetXmlAttribute","tag","nullTag","attribute",attribute,"value","null",null);
                    return;
                }
                String    value     = (String) xmlNode.getAttribs().get(attribute);
                if(value != null ){
                   state.datapush(RString.newRString(value));
                   state.traceInfo("GetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute,"value",value,null);
                }else{
                   state.datapush(RNull.getRNull());
                   state.traceInfo("GetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute,"null","true",null);
                }
            }
View Full Code Here

      @Override
            public void execute(DTState state) throws RulesException {
        IRObject  value     = state.datapop();
        IRObject  attribute = state.datapop();
        XMLNode   xmlNode   = state.datapop().xmlTagValue();
        if(xmlNode != null){
            state.traceInfo("SetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute.stringValue(),"value",value.stringValue(), null);
            xmlNode.getAttribs().put(attribute.stringValue(), value.stringValue());
        }
      }
View Full Code Here

            GetXmlAttribute(){super("getxmlattribute");}

            @Override
            public void execute(DTState state) throws RulesException {
                String    attribute = state.datapop().stringValue();
                XMLNode   xmlNode    = state.datapop().xmlTagValue();
                if(xmlNode == null) {
                    state.datapush(RNull.getRNull());
                    state.traceInfo("GetXmlAttribute","tag","nullTag","attribute",attribute,"value","null",null);
                    return;
                }
                String    value     = (String) xmlNode.getAttribs().get(attribute);
                if(value != null ){
                   state.datapush(RString.newRString(value));
                   state.traceInfo("GetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute,"value",value,null);
                }else{
                   state.datapush(RNull.getRNull());
                   state.traceInfo("GetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute,"null","true",null);
                }
            }
View Full Code Here

      @Override
            public void execute(DTState state) throws RulesException {
        IRObject  value     = state.datapop();
        IRObject  attribute = state.datapop();
        XMLNode   xmlNode   = state.datapop().xmlTagValue();
        if(xmlNode != null){
            state.traceInfo("SetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute.stringValue(),"value",value.stringValue(), null);
            xmlNode.getAttribs().put(attribute.stringValue(), value.stringValue());
        }
      }
View Full Code Here

            GetXmlAttribute(){super("getxmlattribute");}

            @Override
            public void execute(DTState state) throws RulesException {
                String    attribute = state.datapop().stringValue();
                XMLNode   xmlNode    = state.datapop().xmlTagValue();
                if(xmlNode == null) {
                    state.datapush(RNull.getRNull());
                    state.traceInfo("GetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute,"value","null",null);
                    return;
                }
                String    value     = (String) xmlNode.getAttribs().get(attribute);
                if(value != null ){
                   state.datapush(RString.newRString(value));
                   state.traceInfo("GetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute,"value",value,null);
                }else{
                   state.datapush(RNull.getRNull());
                   state.traceInfo("GetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute,"null","true",null);
                }
            }
View Full Code Here

TOP

Related Classes of com.dtrules.mapping.XMLNode

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.