Java HTML Jsoup Document retrieveHiddenInputs(Document doc)

Here you can find the source of retrieveHiddenInputs(Document doc)

Description

retrieve Hidden Inputs

License

Open Source License

Declaration

public static Map<String, String> retrieveHiddenInputs(Document doc) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2014,2015 Hideki Yatomi
 * All rights reserved. This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License v1.0 which
 * accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 ******************************************************************************/

import java.util.*;

import org.jsoup.nodes.*;

public class Main {
    public static Map<String, String> retrieveHiddenInputs(Document doc) {
        Map<String, String> map = new HashMap<>();
        for (Element e : doc.select("form input[type=hidden]")) {
            String name = e.attr("name");
            String value = e.attr("value");
            map.put(name, value);//from www.j  ava 2s.  c om
        }
        return map;
    }
}

Related

  1. keepLineBreak(Document docRes)
  2. makeAbsolute(Document doc)
  3. normalizeWhitespaces(Document doc)
  4. postDocument(String url, Collection data)
  5. removeTag(Document doc, String selector)
  6. saveDocumentToDirectory(final org.jsoup.nodes.Document doc, final String fileName, final Path tmpDir)
  7. stripTags(Document document)
  8. verifyAdultNotice(Document doc)