Package railo.runtime.text.xml

Examples of railo.runtime.text.xml.XMLNodeList


/**
* Implements the CFML Function xmlchildpos
*/
public final class XmlChildPos implements Function {
  public static double call(PageContext pc , Node node, String name, double index) {
    XMLNodeList xmlNodeList = new XMLNodeList(node,false);
    int len=xmlNodeList.getLength();
    // if(index<1)throw new FunctionException(pc,"XmlChildPos","second","index","attribute must be 1 or greater");
    int count=1;
    for(int i=0;i<len;i++) {
      Node n=xmlNodeList.item(i);
      if(XMLUtil.nameEqual(n,name,XMLUtil.isCaseSensitve(n)) && count++==index) return i+1;
    }
    return -1;
  }
View Full Code Here


        return get(key,null)!=null;
  }

    @Override
    public XMLNodeList getXMLNodeList() {
        return new XMLNodeList(node,getCaseSensitive());
    }  
View Full Code Here

TOP

Related Classes of railo.runtime.text.xml.XMLNodeList

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.