Documentation
¶
Overview ¶
Package parser the schema parser
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllParsers ¶
Types ¶
type Parser ¶
type Parser interface {
// GetString gets the string of the content with the given arguments.
// e.g.:
//
// content := `<ul><li>1</li><li>2</li></ul>`
// GetString(ctx, content, "ul li") returns "1\n2"
//
GetString(*plugin.Context, any, string) (string, error)
// GetStrings gets the strings of the content with the given arguments.
// e.g.:
//
// content := `<ul><li>1</li><li>2</li></ul>`
// GetStrings(ctx, content, "ul li") returns []string{"1", "2"}
//
GetStrings(*plugin.Context, any, string) ([]string, error)
// GetElement gets the element of the content with the given arguments.
// e.g.:
//
// content := `<ul><li>1</li><li>2</li></ul>`
// GetElement(ctx, content, "ul li") returns "<li>1</li>\n<li>2</li>"
//
GetElement(*plugin.Context, any, string) (string, error)
// GetElements gets the elements of the content with the given arguments.
// e.g.:
//
// content := `<ul><li>1</li><li>2</li></ul>`
// GetElements(ctx, content, "ul li") returns []string{"<li>1</li>", "<li>2</li>"}
//
GetElements(*plugin.Context, any, string) ([]string, error)
}
Parser the content schema
Click to show internal directories.
Click to hide internal directories.