forked from neo4j-contrib/neo4j-apoc-procedures
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes neo4j-contrib#2975: No docs for apoc.load.htmlPlainText
- Loading branch information
Showing
8 changed files
with
447 additions
and
69 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
docs/asciidoc/modules/ROOT/pages/overview/apoc.load/apoc.load.htmlPlainText.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
//// | ||
This file is generated by DocsTest, so don't change it! | ||
//// | ||
|
||
= apoc.load.htmlPlainText | ||
:description: This section contains reference documentation for the apoc.load.htmlPlainText procedure. | ||
|
||
label:procedure[] label:apoc-full[] | ||
|
||
[.emphasis] | ||
apoc.load.htmlPlainText('urlOrHtml',{name: jquery, name2: jquery}, config) YIELD value - Load Html page and return the result as a Map | ||
|
||
== Signature | ||
|
||
[source] | ||
---- | ||
apoc.load.htmlPlainText(urlOrHtml :: STRING?, query = {} :: MAP?, config = {} :: MAP?) :: (value :: MAP?) | ||
---- | ||
|
||
== Input parameters | ||
[.procedures, opts=header] | ||
|=== | ||
| Name | Type | Default | ||
|urlOrHtml|STRING?|null | ||
|query|MAP?|{} | ||
|config|MAP?|{} | ||
|=== | ||
|
||
== Output parameters | ||
[.procedures, opts=header] | ||
|=== | ||
| Name | Type | ||
|value|MAP? | ||
|=== | ||
|
||
[[usage-apoc.load.htmlPlainText]] | ||
== Usage Examples | ||
include::partial$usage/apoc.load.htmlPlainText.adoc[] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
docs/asciidoc/modules/ROOT/partials/html/query-selectors.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
== Css / jQuery selectors | ||
|
||
The jsoup class https://jsoup.org/apidocs/org/jsoup/nodes/Element.html[org.jsoup.nodes.Element] | ||
provides a set of functions that can be used. | ||
Anyway, we can emulate all of them using the appropriate css/jQuery selectors in these ways | ||
(except for the last one, we can substitute the `*` with a tag name to search into it instead of everywhere. Furthermore, by removing the `*` selector will be returned the same result): | ||
|
||
|
||
[opts="header"] | ||
|=== | ||
| jsoup function | css/jQuery selector | description | ||
| `getElementById(id)` | `#id` | Find an element by ID, including or under this element. | ||
| `getElementsByTag(tag)` | `tag` | Finds elements, including and recursively under this element, with the specified tag name. | ||
| `getElementsByClass(className)` | `.className` | Find elements that have this class, including or under this element. | ||
| `getElementsByAttribute(key)` | `[key]` | Find elements that have a named attribute set. | ||
| `getElementsByAttributeStarting(keyPrefix)` | `*[^keyPrefix]` | Find elements that have an attribute name starting with the supplied prefix. Use data | to find elements that have HTML5 datasets. | ||
| `getElementsByAttributeValue(key,value)` | `*[key=value]` | Find elements that have an attribute with the specific value. | ||
| `getElementsByAttributeValueContaining(key,match)` |`*[key*=match]` | Find elements that have attributes whose value contains the match string. | ||
| `getElementsByAttributeValueEnding(key,valueSuffix)` | `*[class$="test"]` | Find elements that have attributes that end with the value suffix. | ||
| `getElementsByAttributeValueMatching(key,regex)` |`*[id~=content]` | Find elements that have attributes whose values match the supplied regular expression. | ||
| `getElementsByAttributeValueNot(key,value)` |`*:not([key="value"])` | Find elements that either do not have this attribute, or have it with a different value. | ||
| `getElementsByAttributeValueStarting(key,valuePrefix)` |`*[key^=valuePrefix]` | Find elements that have attributes that start with the value prefix. | ||
| `getElementsByIndexEquals(index)` |`*:nth-child(index)` | Find elements whose sibling index is equal to the supplied index. | ||
| `getElementsByIndexGreaterThan(index)` |`*:gt(index)` | Find elements whose sibling index is greater than the supplied index. | ||
| `getElementsByIndexLessThan(index)` |`*:lt(index)` | Find elements whose sibling index is less than the supplied index. | ||
| `getElementsContainingOwnText(searchText)` |`*:containsOwn(searchText)` | Find elements that directly contain the specified string. | ||
| `getElementsContainingText(searchText)` |`*:contains('searchText')` | Find elements that contain the specified string. | ||
| `getElementsMatchingOwnText(regex)` |`*:matches(regex)` | Find elements whose text matches the supplied regular expression. | ||
| `getElementsMatchingText(pattern)` |`*:matchesOwn(pattern)` | Find elements whose text matches the supplied regular expression. | ||
| `getAllElements()` |`*` | Find all elements under document (including self, and children of children). | ||
|=== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
== Load from runtime generated file | ||
|
||
If we have a `test.html` file with a jQuery script like: | ||
|
||
[source,html] | ||
---- | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script> | ||
<script type="text/javascript"> | ||
$(() => { | ||
var newP = document.createElement("strong"); | ||
var textNode = document.createTextNode("This is a new text node"); | ||
newP.appendChild(textNode); | ||
document.getElementById("appendStuff").appendChild(newP); | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
<div id="appendStuff"></div> | ||
</body> | ||
</html> | ||
---- | ||
|
||
we can read the generated js through the `browser` config. | ||
Note that to use the `browser` config (except with `"NONE"` value), you have to install additional dependencies | ||
which can be downloaded https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/{apoc-release}/apoc-selenium-dependencies-{apoc-release}.jar[from this link]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.