Package groovy.util.slurpersupport

Examples of groovy.util.slurpersupport.NodeChild


   * Note if this is called more than once all calls after the first will return null
   *
   */
  public GPathResult getDocument() {
    try {
      return new NodeChild(this.currentNode, null, this.namespaceTagHints);
    } finally {
      this.currentNode = null;
    }
  }
View Full Code Here


   * Note if this is called more than once all calls after the first will return null
   *
   */
  public GPathResult getDocument() {
    try {
      return new NodeChild(this.currentNode, null, this.namespaceTagHints);
    } finally {
      this.currentNode = null;
    }
  }
View Full Code Here

    static class NodeChild_FieldValue extends GPath_FieldValue
    {
        public Object getFieldValuePrimitive (Object receiver, FieldPath keyPath)
        {
            NodeChild node = (NodeChild)receiver;
            String key = keyPath.car();

            // try a string value
            Object attrValue = node.attributes().get(key);
            if (attrValue != null) return attrValue;

            return super.getFieldValuePrimitive(receiver, keyPath);
        }
View Full Code Here

   * Note if this is called more than once all calls after the first will return null
   *
   */
  public GPathResult getDocument() {
    try {
      return new NodeChild(this.currentNode, null, this.namespaceTagHints);
    } finally {
      this.currentNode = null;
    }
  }
View Full Code Here

        try {
            // xml namespace is always defined
            if (namespaceAware) {
                namespaceTagHints.put("xml", "http://www.w3.org/XML/1998/namespace");
            }
            return new NodeChild(currentNode, null, namespaceTagHints);
        } finally {
            currentNode = null;
        }
    }
View Full Code Here

                        new Object[]{"api_key", getConfigValueAsString(FLICKR_API_KEY)},
                        new Object[]{"method", "flickr.photos.search"},
                        new Object[]{"tags", tag}
                )}
        ));
        NodeChild root = (NodeChild)response.getData();
        NodeChild photosNode = (NodeChild)root.children().getAt(0);
       
        int i = 0;
        for (Iterator<Node> children = photosNode.childNodes(); i < 3 && children.hasNext(); i++) {
            Node photo = children.next();
            Map<String, Object> attributes = photo.attributes();
           
            photos.add(
                new Photo(attributes.get("title").toString(),   
View Full Code Here

     *         Note if one of the parse methods has been called then this returns null
     *         Note if this is called more than once all calls after the first will return null
     */
    public GPathResult getDocument() {
        try {
            return new NodeChild(currentNode, null, namespaceTagHints);
        } finally {
            currentNode = null;
        }
    }
View Full Code Here

TOP

Related Classes of groovy.util.slurpersupport.NodeChild

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.