Skip to content

Parsel is a Java library for parsing HTML and XML to extract data using XPath selector.

License

Notifications You must be signed in to change notification settings

skynetbinary/parsel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parsel

Parsel is a Java library for parsing HTML and XML to extract data using XPath selector. The project is inspired by Python's Parsel library.

Example

import io.parsel.Selector;
import io.parsel.SelectorList;

public class Example {
    public static void main(String[] args) {
        String text = "<html><head><title>Selector List</title></head></html>";
        Selector selector = new Selector(text);
        SelectorList title = selector.xpath("//title/text()");
        // This will output "Selector List".
        System.out.println(title.extract()[0]);
    }
}

About

Parsel is a Java library for parsing HTML and XML to extract data using XPath selector.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages