├── .gitignore ├── LICENSE.md ├── README.md ├── docs ├── Attribute.html ├── Dominator.html ├── Filter.html ├── Node.html ├── Output.html ├── file_hashes.json ├── images │ └── ddox │ │ ├── alias.png │ │ ├── class.png │ │ ├── enum.png │ │ ├── enummember.png │ │ ├── function.png │ │ ├── inherited.png │ │ ├── interface.png │ │ ├── module.png │ │ ├── package.png │ │ ├── private.png │ │ ├── property.png │ │ ├── protected.png │ │ ├── struct.png │ │ ├── template.png │ │ └── variable.png ├── index.html ├── libdominator.html ├── libdominator │ ├── Attribute.html │ ├── Attribute │ │ ├── Attribute.html │ │ ├── Attribute.matches.html │ │ ├── Attribute.matchesKey.html │ │ ├── Attribute.matchesValue.html │ │ └── Attribute.this.html │ ├── Dominator.html │ ├── Dominator │ │ ├── Dominator.getElelment.html │ │ ├── Dominator.getInner.html │ │ ├── Dominator.getNodes.html │ │ ├── Dominator.getStartElement.html │ │ ├── Dominator.html │ │ ├── Dominator.load.html │ │ ├── Dominator.stripTags.html │ │ └── Dominator.this.html │ ├── Filter.html │ ├── Filter │ │ ├── DomFilter.empty.html │ │ ├── DomFilter.followers.html │ │ ├── DomFilter.front.html │ │ ├── DomFilter.html │ │ ├── DomFilter.next.html │ │ ├── DomFilter.opApply.html │ │ ├── DomFilter.parseAttributexpression.html │ │ ├── DomFilter.this.html │ │ ├── TagElement.has.html │ │ ├── TagElement.html │ │ ├── filterComments.html │ │ └── filterDom.html │ ├── Node.html │ ├── Node │ │ ├── Node.addAttribute.html │ │ ├── Node.addChild.html │ │ ├── Node.getAttributes.html │ │ ├── Node.getChildren.html │ │ ├── Node.getEndPosition.html │ │ ├── Node.getEndTagLength.html │ │ ├── Node.getParent.html │ │ ├── Node.getSiblings.html │ │ ├── Node.getStartPosition.html │ │ ├── Node.getStartTagLength.html │ │ ├── Node.getTag.html │ │ ├── Node.hasChildren.html │ │ ├── Node.hasParent.html │ │ ├── Node.html │ │ ├── Node.isComment.html │ │ ├── Node.setEndPosition.html │ │ ├── Node.setEndTagLength.html │ │ ├── Node.setParent.html │ │ ├── Node.setStartPosition.html │ │ ├── Node.setStartTagLength.html │ │ ├── Node.setTag.html │ │ └── Node.this.html │ ├── Output.html │ └── Output │ │ └── nodeOutputItems.html ├── package.html ├── prettify │ └── prettify.css ├── scripts │ ├── ddox.js │ └── jquery.js ├── sitemap.xml ├── styles │ └── ddox.css └── symbols.js ├── dub.json ├── source └── libdominator │ ├── Attribute.d │ ├── Dominator.d │ ├── Filter.d │ ├── Node.d │ └── package.d └── tests └── dummy.html /.gitignore: -------------------------------------------------------------------------------- 1 | .dub 2 | docs.json 3 | __dummy.html 4 | *.o 5 | *.obj 6 | *.a 7 | .vscode 8 | dub.selections.json 9 | libdominator-test-library 10 | *.sublime-project 11 | *.sublime-workspace -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Martin Brzenska 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # libdominator 2 | libdominator is a xml/html parser library written in [d](http://www.dlang.org) 3 | 4 | ## usage 5 | ```D 6 | unittest { 7 | const string html = 8 | `
9 |

Here comes a list!

10 | 18 |

another list

19 |
    20 |
  1. eins
  2. 21 |
  3. zwei
  4. 22 |
  5. drei
  6. 23 |
      24 |

      have a nice day

      25 |
`; 26 | 27 | Dominator dom = new Dominator(html); 28 | 29 | foreach(node ; dom.filterDom("ul.li")) { 30 | //do more usefull stuff then: 31 | assert(node.getParent.getTag() == "ul"); 32 | } 33 | 34 | Node[] nodes = dom.filterDom("ul.li"); 35 | assert(dom.getInner( nodes[0] ) == "one" ); 36 | assert(nodes[0].getAttributes() == [ Attribute("class","wanted") ] ); 37 | assert(Attribute("class","wanted").matches(nodes[0])); 38 | assert(Attribute("class","wanted").matches(nodes[2])); 39 | assert(Attribute("class",["wanted","hard"]).matches(nodes[2])); 40 | assert(nodes[1].isComment()); 41 | 42 | assert(dom.filterDom("ul.li").length == 6); 43 | assert(dom.filterDom("ul.li").filterComments.length == 5); 44 | assert(dom.filterDom("li").length == 9); 45 | assert(dom.filterDom("li[1]").length == 1); //the first li in the dom 46 | assert(dom.filterDom("*.li[1]").length == 2); //the first li in ul and first li in ol 47 | assert(dom.getInner( (*dom.filterDom("*{checked:}").ptr) ) == "five"); 48 | 49 | } 50 | ``` 51 | 52 | # Filter Syntax 53 | Expression = TAG[PICK]{ATTR_NAME:ATTR_VALUE} 54 | Multiple expressions can be concatenated with "." to find nodes inside of one or more parent nodes. 55 | 56 | | Item | Description | Example | 57 | |------|-------------|---------| 58 | | TAG | The Name of the node | a , p , div , * | 59 | | [PICK] | (can be ommited) Picks only the n th match. n begins on 1. PICK can be a list or range | [1] picks the first match , [1,3] picks the first and third , [1..3] picks the first three matches | 60 | | {ATTR_NAME:ATTR_VALUE} | The attribute selector | {id:myID} , {class:someClass} , {href:(regex)^http://} | 61 | 62 | See also https://github.com/mab-on/dominator 63 | -------------------------------------------------------------------------------- /docs/Attribute.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libdominator.Attribute 5 | 6 |

libdominator.Attribute

7 | License:
8 | Distributed under the terms of the MIT license. 9 | Consult the provided LICENSE.md file for details

10 | 11 |
struct Attribute; 12 |
13 |
Struct for Node Attributes

14 | 15 |
this(string key, string values); 16 |
17 |
Params:
18 | 19 | 20 | 21 | 22 |
string keythe Name of the Attribute (can be prefixed with '(regex)')
string valuesa whitespace serparated List of Attribute Values (each Value can be prefixed with '(regex)')

23 | 24 |
25 |
this(string key, string[] values); 26 |
27 |
Params:
28 | 29 | 30 | 31 | 32 |
string keyThe name of the attribute (can be prefixed with '(regex)')
string[] valuesArray of attribute values (each value can be prefixed with '(regex)')

33 | 34 |
35 |
bool matchesKey(Node node); 36 |
37 |
Checks if the given node matches the attributes given key

38 | 39 |
40 |
bool matchesValue(Node node); 41 |
42 |
Checks if at least one of the attribute values of the given node matches the given attribute values

43 | 44 |
45 |
bool matches(Node node); 46 |
47 |
Checks if the given node matches key and values of this attribute. 48 | Note that all atribute values from this attribute must match the given nodes attribute values - not the other way round

49 | 50 |
51 |
52 |
53 |
54 | 55 |
Page generated by Ddoc. (C) 2016 Martin Brzenska 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/Dominator.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libdominator.Dominator 5 | 6 |

libdominator.Dominator

7 | License:
8 | Distributed under the terms of the MIT license. 9 | Consult the provided LICENSE.md file for details

10 | 11 |
class Dominator; 12 |
13 |
Parse, hierarchize, analyse xhtml

14 | 15 |
this(); 16 |
17 |
Instantiate empty Dominator

18 | 19 |
20 |
this(string haystack); 21 |
22 |
Instantiate object and load the Document

23 | 24 |
25 |
Dominator load(string haystack); 26 |
27 |
loads a Document 28 |

29 | Params:
30 | 31 | 32 |
string haystackthe Document String

33 | 34 |
35 |
Node[] getNodes(); 36 |
37 |
returns all found Nodes. 38 | Please note, that also Nodes will be returned which was found in comments. 39 | use isComment() to check if a Node is in a comment or use libdominator.Filter.filterComments() 40 |

41 | Returns:
42 | Nodes[]

43 | 44 |
45 |
string getStartElement(Node node); 46 |
47 |
gets the Tag Name of the Node 48 |

49 | Params:
50 | 51 | 52 |
Node nodeThe Node to get the Tag Name from

53 | Returns:
54 | The Tag Name as string

55 | 56 |
57 |
string getElelment(Node node); 58 |
59 |
gets the part of the loaded Document from the nodes begining to its end 60 |

61 | Params:
62 | 63 | 64 |
Node nodeThe Node from which you want to get the Document representation

65 | 66 |
67 |
string getInner(Node node); 68 |
69 |
gets the Inner-HTML from the given node 70 |

71 | Params:
72 | 73 | 74 |
Node nodeThe Node from which you want to get the Inner-HTML

75 | 76 |
77 |
78 |
79 |
80 | 81 |
Page generated by Ddoc. (C) 2016 Martin Brzenska 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /docs/Filter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libdominator.Filter 5 | 6 |

libdominator.Filter

7 | License:
8 | Distributed under the terms of the MIT license. 9 | Consult the provided LICENSE.md file for details

10 | 11 |
struct DomFilter; 12 |
13 |
Use this to filter html

14 | 15 |
this(string[] expressions); 16 |
17 |
A dominator specific array of filter expressions

18 | 19 |
20 |
this(string expression); 21 |
22 |
A dominator specific filter expression

23 | 24 |
25 |
Attribute[] parseAttributexpression(string expression); 26 |
27 |
parses the attribute filter expression and boxes it into an handy array of Attribute

28 | 29 |
30 |
bool next(); 31 |
32 |
Moves the cursor to the next TagElement if exists 33 |

34 | Returns:
35 | true if the cursor could be moved, otherwise false

36 | 37 |
38 |
TagElement front(); 39 |
40 |
The current TagElement, which is under the cursor. 41 | if there is no TagElement, then a empty TagElement will be returned.

42 | 43 |
44 |
size_t followers(); 45 |
46 |
The number of following TagElements after the current TagElement

47 | 48 |
49 |
int opApply(int delegate(ref TagElement) dg); 50 |
51 |
opApply on TagElements

52 | 53 |
54 |
bool empty(); 55 |
56 |
Checks if there are any TagElements. 57 | in other words: Checks if the DomFilter is loaded with some filterarguments or not.

58 | 59 |
60 |
61 |
62 |
struct TagElement; 63 |
64 |
The TagElement is the struct for the atomic part of a filter expression. 65 |

66 | Examples:
67 |
a[1]{class:someClass}
 68 | 
69 |

70 | 71 |
bool has(size_t pick); 72 |
73 |
checks if the TagElement matches the given pick

74 | 75 |
76 |
77 |
78 |
Node[] filterDom(Dominator dom, DomFilter expressions); 79 |
80 |
Filters the given DOM and returns the nodes, that matches the given filter expression

81 | 82 |
83 |
Node[] filterDom(Dominator dom, DomFilter[] expressions); 84 |
85 |
Filters the given DOM and returns the nodes, that matches the given filter expressions

86 | 87 |
88 |
Node[] filterDom(Node[] nodes, DomFilter[] expressions); 89 |
90 |
Filters the given Nodes and returns the nodes, that matches the given filter expressions

91 | 92 |
93 |
Node[] filterDom(Node[] nodes, DomFilter exp); 94 |
95 |
Filters the given Nodes and returns the nodes, that matches the given filter expression

96 | 97 |
98 |
Node[] filterComments(Node[] nodes); 99 |
Node[] filterComments(Dominator dom); 100 |
101 |
throws the Nodes away which are inside of a comment 102 |

103 | Returns:
104 | Node[]

105 | 106 |
107 |
108 | 109 |
Page generated by Ddoc. (C) 2016 Martin Brzenska 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /docs/Node.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libdominator.Node 5 | 6 |

libdominator.Node

7 | License:
8 | Distributed under the terms of the MIT license. 9 | Consult the provided LICENSE.md file for details

10 | 11 |
class Node; 12 |
13 |
Represents a node in a DOM

14 | 15 |
this(); 16 |
17 |
Makes a naked node object

18 | 19 |
20 |
this(string tag); 21 |
22 |
Makes a node with a given tagname

23 | 24 |
25 |
this(T)(string tag, T startPosition); 26 |
27 |
Makes a node with a given tagname and with the information for the position in the Document

28 | 29 |
30 |
Node setTag(string tag); 31 |
32 |
Sets the tagname

33 | 34 |
35 |
Node setStartPosition(T)(T position); 36 |
37 |
Sets the position in the document where this node begins

38 | 39 |
40 |
Node setEndPosition(T)(T position); 41 |
42 |
Sets the position in the document where this node ends

43 | 44 |
45 |
string getTag(); 46 |
Attribute[] getAttributes(); 47 |
void addAttribute(Attribute attribute); 48 |
uint getStartPosition(); 49 |
uint getEndPosition(); 50 |
Node setStartTagLength(T)(T length); 51 |
Node setEndTagLength(T)(T length); 52 |
ushort getStartTagLength(); 53 |
ushort getEndTagLength(); 54 |
55 |
Does what the name says

56 | 57 |
58 |
Node isComment(bool sw); 59 |
60 |
Markes this node to be inside of a comment

61 | 62 |
63 |
bool isComment(); 64 |
65 |
Returns:
66 | true if the node is marked to be inside of a comment, otherwise false.

67 | 68 |
69 |
void setParent(Node* pNode); 70 |
71 |
Sets the given node as the parent node

72 | 73 |
74 |
Node getParent(); 75 |
76 |
Does what the name says

77 | 78 |
79 |
void addChild(Node* pNode); 80 |
81 |
Adds a node as a child node

82 | 83 |
84 |
Node[] getChildren(); 85 |
86 |
Does what the name says

87 | 88 |
89 |
size_t hasChildren(); 90 |
91 |
Returns:
92 | true if the node has children nodes.

93 | 94 |
95 |
bool hasParent(); 96 |
97 |
Returns:
98 | true if the node has a parent node.

99 | 100 |
101 |
102 |
103 |
104 | 105 |
Page generated by Ddoc. (C) 2016 Martin Brzenska 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /docs/Output.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libdominator.Output 5 | 6 |

libdominator.Output

7 | License:
8 | Distributed under the terms of the MIT license. 9 | Consult the provided LICENSE.md file for details

10 | 11 |
string[] nodeOutputItems(ref Dominator dom, Node node, string[] optOutItems); 12 |
13 |
Builds a output string 14 |

15 | Params:
16 | 17 | 18 | 19 | 20 | 21 | 22 |
Dominator domThe DOM Object
Node nodeA node, that is part of dom
string[] optOutItemsDefines the output contents

23 | 24 |
25 |
26 | 27 |
Page generated by Ddoc. (C) 2016 Martin Brzenska 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/file_hashes.json: -------------------------------------------------------------------------------- 1 | {"libdominator/Filter/DomFilter.empty.html":"145CAB3CFB3E8BEC0F4105EEC6A30AD2","libdominator/Node/Node.getTag.html":"A6426354E99B562C5E799F63891F68D0","libdominator/Dominator/Dominator.stripTags.html":"D64B621EA8C63A4D374F2F6B5D4D6D36","libdominator/Dominator/Dominator.getNodes.html":"7EEEC80217612931642C13BDD11C9072","libdominator/Filter/DomFilter.html":"0AB3123D7E7335B9BE65F3F56915E9D7","libdominator/Attribute.html":"1A93102AB59001400CB242FF279C52CB","libdominator/Node/Node.getStartTagLength.html":"8F6ACA0F7D3BA441F952F2C0A315EFFF","libdominator/Dominator/Dominator.html":"587942ECE4E3FABF1ED62EC00C4A0CCA","libdominator/Filter/DomFilter.followers.html":"C95A664480827089237764C4791C596D","libdominator/Node/Node.getSiblings.html":"6AAF784126BA7575BE5D08549DA45482","libdominator/Dominator/Dominator.getElelment.html":"40C23AC9021EF54D361B299A6427C0D0","libdominator/Output.html":"426DCF5C75DE377988865AD0F926C902","libdominator/Dominator/Dominator.load.html":"A859E0C5413D20F248795E6FC853C1E2","libdominator/Attribute/Attribute.matches.html":"7F35EFC5ED9AFBC447F87AAE1A4250A2","libdominator/Attribute/Attribute.this.html":"09184AE0B7B8463E140BEF83B48485D1","libdominator/Filter/filterDom.html":"2E6B12BE404E3A470325643802D1DBE7","libdominator/Filter.html":"7334F27129A6DA71C63057AD5550F979","libdominator/Node/Node.getChildren.html":"0F16DC8E4783EAF46E6AE93C6D0CA913","libdominator/Node/Node.hasParent.html":"83EF54DE764BA2BFBE0A78D433707613","libdominator/Node/Node.getStartPosition.html":"5D2016C72D6BDF4344500F0A95EA67C9","libdominator/Node/Node.setEndPosition.html":"19CEAF71ACC048D1A1FE21F2ED312E11","libdominator/Node/Node.getParent.html":"E758FD4A43D283B0AFD7FABB90A11B83","libdominator/Filter/TagElement.has.html":"E09B6D07FF472C812519CF27733EF638","libdominator/Attribute/Attribute.matchesValue.html":"B2469F0DFD94152A018EAC1206B2C0F2","libdominator/Node/Node.hasChildren.html":"430200C6CAD09C14215B8BA8AE493BCF","libdominator/Node/Node.addAttribute.html":"F1AD82E00F9E639DCE920762FDD58088","index.html":"F1B8CCC26E2A79CFDF7ED83780F81E6E","libdominator/Filter/DomFilter.front.html":"299B9C7619516475EB2AFA144BFB7133","libdominator/Node/Node.this.html":"53D77601557156618EACD4151C9C8615","libdominator/Dominator/Dominator.getInner.html":"A773F32CD06820BD07CC7553A2F01C51","libdominator/Filter/DomFilter.this.html":"EC7703A1BF3B487137FA9D2D9BCB6C26","libdominator/Node/Node.getAttributes.html":"DC199258B63C09FC377C8B55E31BFC0D","libdominator/Node/Node.getEndPosition.html":"DC02096464CA7591974B2E833704E279","libdominator/Dominator/Dominator.getStartElement.html":"80BBACF39E2A767BCA0634128C924CCB","libdominator/Node/Node.addChild.html":"134FB686A18F1F280C6BE22E0E89F4CA","libdominator/Filter/TagElement.html":"F2636D55FBE4037563117903A7DF5B59","libdominator/Node/Node.getEndTagLength.html":"D28EB4A45ADC16EF39939EDD9BACA495","libdominator/Filter/DomFilter.parseAttributexpression.html":"F48A9F8E71B0A929C34F4417B7EC22FD","libdominator/Node/Node.setStartTagLength.html":"2717767C89FCBDCEA168F11D863574CA","sitemap.xml":"0A2F36CD65EE9FDBEF58E0950DF9DCA2","libdominator/Filter/DomFilter.opApply.html":"AC9298933EAC331F2C2AB4AE13B6BFB1","libdominator/Node/Node.isComment.html":"533CCCE5F96A4C28EBBDE212AAB50866","libdominator/Node/Node.setEndTagLength.html":"D81EBF1BBC5BDE8FFD019BFEB04A98B3","libdominator/Filter/filterComments.html":"B3B697A138D707FE1F89C48F23FC96F5","libdominator/Node.html":"0621BE7BAC256F9530B03CFF4920A2E3","libdominator/Node/Node.setStartPosition.html":"FEF289A5A77EC64AFF76CD3F2B4E20A1","libdominator/Node/Node.setTag.html":"B4E90B4DE884087468CBC5004DDA56B0","libdominator/Output/nodeOutputItems.html":"696C4C7930935F0542BEF6B8AFB3BF4C","libdominator/Attribute/Attribute.html":"A79CDF8ED3F66792B71D021A2FC24AE7","libdominator/Node/Node.setParent.html":"1365DA4A7B4AF5934AE60AFB98135322","libdominator/Attribute/Attribute.matchesKey.html":"2190FF7D54291CCF11B89782CA75E0D3","libdominator/Dominator/Dominator.this.html":"234A37EF7B826CCC1C57D9727D1962BC","libdominator.html":"FD41C77616B1604225F3BC8D691141D8","libdominator/Filter/DomFilter.next.html":"6ABA1785605D2CE3687061A94887D234","libdominator/Node/Node.html":"EEAC7C8238CB55032A53117927922E8D","symbols.js":"D65DA0F130F7FD847C7B455CC579B141","libdominator/Dominator.html":"06E713DBD5EAC10BD3471099AAE5C8B5"} -------------------------------------------------------------------------------- /docs/images/ddox/alias.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/alias.png -------------------------------------------------------------------------------- /docs/images/ddox/class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/class.png -------------------------------------------------------------------------------- /docs/images/ddox/enum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/enum.png -------------------------------------------------------------------------------- /docs/images/ddox/enummember.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/enummember.png -------------------------------------------------------------------------------- /docs/images/ddox/function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/function.png -------------------------------------------------------------------------------- /docs/images/ddox/inherited.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/inherited.png -------------------------------------------------------------------------------- /docs/images/ddox/interface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/interface.png -------------------------------------------------------------------------------- /docs/images/ddox/module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/module.png -------------------------------------------------------------------------------- /docs/images/ddox/package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/package.png -------------------------------------------------------------------------------- /docs/images/ddox/private.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/private.png -------------------------------------------------------------------------------- /docs/images/ddox/property.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/property.png -------------------------------------------------------------------------------- /docs/images/ddox/protected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/protected.png -------------------------------------------------------------------------------- /docs/images/ddox/struct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/struct.png -------------------------------------------------------------------------------- /docs/images/ddox/template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/template.png -------------------------------------------------------------------------------- /docs/images/ddox/variable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mab-on/libdominator/13998c72783658ac109b9114224b2dcbfdd54cf2/docs/images/ddox/variable.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | API documentation 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

API documentation

55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 65 | 68 | 69 | 70 | 73 | 76 | 77 | 78 | 81 | 84 | 85 | 86 | 89 | 92 | 93 | 94 | 97 | 100 | 101 | 102 | 105 | 108 | 109 |
ModuleDescription
63 | libdominator.Attribute 64 | 66 | 67 |
71 | libdominator.Dominator 72 | 74 | 75 |
79 | libdominator.Filter 80 | 82 | 83 |
87 | libdominator.Node 88 | 90 | 91 |
95 | libdominator.Output 96 | 98 | 99 |
103 | libdominator 104 | 106 | 107 |
110 |
111 |

Authors

112 |
113 |
114 |

Copyright

115 |
116 |
117 |

License

118 |
119 |
120 | 121 | -------------------------------------------------------------------------------- /docs/libdominator.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Module libdominator 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Module libdominator

55 |

56 | 57 |
58 |
59 |

Authors

60 | 61 |
62 |
63 |

Copyright

64 |

(C) 2016 Martin Brzenska 65 |

66 | 67 |
68 |
69 |

License

70 |

Distributed under the terms of the MIT license. 71 | Consult the provided LICENSE.md file for details 72 |

73 | 74 |
75 |
76 | 77 | -------------------------------------------------------------------------------- /docs/libdominator/Attribute.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Module libdominator.Attribute 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Module libdominator.Attribute

55 |

56 | 57 |
58 |
59 |

Structs

60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 72 | 74 | 75 |
NameDescription
68 | 69 | Attribute 70 | 71 | Struct for Node Attributes 73 |
76 |
77 |
78 |

Authors

79 | 80 |
81 |
82 |

Copyright

83 |

(C) 2016 Martin Brzenska 84 |

85 | 86 |
87 |
88 |

License

89 |

Distributed under the terms of the MIT license. 90 | Consult the provided LICENSE.md file for details 91 |

92 | 93 |
94 |
95 | 96 | -------------------------------------------------------------------------------- /docs/libdominator/Attribute/Attribute.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Struct Attribute 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Struct Attribute

55 |
56 |

Struct for Node Attributes 57 |

58 | 59 |
60 |

Constructors

61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 73 | 74 | 75 | 76 | 81 | 82 | 83 |
NameDescription
69 | 70 | this 71 | 72 |
77 | 78 | this 79 | 80 |
84 |
85 |
86 |

Methods

87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 99 | 102 | 103 | 104 | 109 | 111 | 112 | 113 | 118 | 120 | 121 |
NameDescription
95 | 96 | matches 97 | 98 | Checks if the given node matches key and values of this attribute. 100 | Note that all atribute values from this attribute must match the given nodes attribute values - not the other way round 101 |
105 | 106 | matchesKey 107 | 108 | Checks if the given node matches the attributes given key 110 |
114 | 115 | matchesValue 116 | 117 | Checks if at least one of the attribute values of the given node matches the given attribute values 119 |
122 |
123 | 124 |
125 |
126 |

Authors

127 | 128 |
129 |
130 |

Copyright

131 |

(C) 2016 Martin Brzenska 132 |

133 | 134 |
135 |
136 |

License

137 |

Distributed under the terms of the MIT license. 138 | Consult the provided LICENSE.md file for details 139 |

140 | 141 |
142 |
143 | 144 | -------------------------------------------------------------------------------- /docs/libdominator/Attribute/Attribute.matches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Attribute.matches 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Attribute.matches

55 |
56 |

Checks if the given node matches key and values of this attribute. 57 | Note that all atribute values from this attribute must match the given nodes attribute values - not the other way round 58 |

59 | 60 |
61 |

Prototype

62 |
63 | 64 | bool matches( 65 |
66 |   Node node 67 |
68 | ); 69 |
70 |
71 |
72 | 73 |
74 |
75 |

Authors

76 | 77 |
78 |
79 |

Copyright

80 |

(C) 2016 Martin Brzenska 81 |

82 | 83 |
84 |
85 |

License

86 |

Distributed under the terms of the MIT license. 87 | Consult the provided LICENSE.md file for details 88 |

89 | 90 |
91 |
92 | 93 | -------------------------------------------------------------------------------- /docs/libdominator/Attribute/Attribute.matchesKey.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Attribute.matchesKey 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Attribute.matchesKey

55 |
56 |

Checks if the given node matches the attributes given key 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | bool matchesKey( 64 |
65 |   Node node 66 |
67 | ); 68 |
69 |
70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Attribute/Attribute.matchesValue.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Attribute.matchesValue 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Attribute.matchesValue

55 |
56 |

Checks if at least one of the attribute values of the given node matches the given attribute values 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | bool matchesValue( 64 |
65 |   Node node 66 |
67 | ); 68 |
69 |
70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Attribute/Attribute.this.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Attribute.this - multiple declarations 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Attribute.this - multiple declarations

55 | 59 |
60 |

Function Attribute.this

61 |

62 | 63 |
64 |

Prototype

65 |
66 | 67 | ref this( 68 |
69 |   string key, 70 |
71 |   string values 72 |
73 | ); 74 |
75 |
76 |
77 |

Parameters

78 | 79 | 80 | 81 |
NameDescription
key the Name of the Attribute (can be prefixed with '(regex)')
values a whitespace serparated List of Attribute Values (each Value can be prefixed with '(regex)')
82 |
83 | 84 |
85 |
86 |

Function Attribute.this

87 |

88 | 89 |
90 |

Prototype

91 |
92 | 93 | ref this( 94 |
95 |   string key, 96 |
97 |   string[] values 98 |
99 | ); 100 |
101 |
102 |
103 |

Parameters

104 | 105 | 106 | 107 |
NameDescription
key The name of the attribute (can be prefixed with '(regex)')
values Array of attribute values (each value can be prefixed with '(regex)')
108 |
109 | 110 |
111 |
112 |

Authors

113 | 114 |
115 |
116 |

Copyright

117 |

(C) 2016 Martin Brzenska 118 |

119 | 120 |
121 |
122 |

License

123 |

Distributed under the terms of the MIT license. 124 | Consult the provided LICENSE.md file for details 125 |

126 | 127 |
128 |
129 | 130 | -------------------------------------------------------------------------------- /docs/libdominator/Dominator.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Module libdominator.Dominator 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Module libdominator.Dominator

55 |

56 | 57 |
58 |
59 |

Classes

60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 72 | 74 | 75 |
NameDescription
68 | 69 | Dominator 70 | 71 | Parse, hierarchize, analyse xhtml 73 |
76 |
77 |
78 |

Authors

79 | 80 |
81 |
82 |

Copyright

83 |

(C) 2016 Martin Brzenska 84 |

85 | 86 |
87 |
88 |

License

89 |

Distributed under the terms of the MIT license. 90 | Consult the provided LICENSE.md file for details 91 |

92 | 93 |
94 |
95 | 96 | -------------------------------------------------------------------------------- /docs/libdominator/Dominator/Dominator.getElelment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Dominator.getElelment 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Dominator.getElelment

55 |
56 |

gets the part of the loaded Document from the nodes begining to its end 57 |

58 |
59 | 60 |
61 |

Prototype

62 |
63 | 64 | string getElelment( 65 |
66 |   Node node 67 |
68 | ); 69 |
70 |
71 |
72 |

Parameters

73 | 74 | 75 |
NameDescription
node The Node from which you want to get the Document representation
76 |
77 | 78 |
79 |
80 |

Authors

81 | 82 |
83 |
84 |

Copyright

85 |

(C) 2016 Martin Brzenska 86 |

87 | 88 |
89 |
90 |

License

91 |

Distributed under the terms of the MIT license. 92 | Consult the provided LICENSE.md file for details 93 |

94 | 95 |
96 |
97 | 98 | -------------------------------------------------------------------------------- /docs/libdominator/Dominator/Dominator.getInner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Dominator.getInner 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Dominator.getInner

55 |
56 |

gets the Inner-HTML from the given node 57 |

58 |
59 | 60 |
61 |

Prototype

62 |
63 | 64 | string getInner( 65 |
66 |   Node node 67 |
68 | ); 69 |
70 |
71 |
72 |

Parameters

73 | 74 | 75 |
NameDescription
node The Node from which you want to get the Inner-HTML
76 |
77 | 78 |
79 |
80 |

Authors

81 | 82 |
83 |
84 |

Copyright

85 |

(C) 2016 Martin Brzenska 86 |

87 | 88 |
89 |
90 |

License

91 |

Distributed under the terms of the MIT license. 92 | Consult the provided LICENSE.md file for details 93 |

94 | 95 |
96 |
97 | 98 | -------------------------------------------------------------------------------- /docs/libdominator/Dominator/Dominator.getNodes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Dominator.getNodes 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Dominator.getNodes

55 |
56 |

returns all found Nodes. 57 | Please note, that also Nodes will be returned which was found in comments. 58 | use isComment() to check if a Node is in a comment or use libdominator.Filter.filterComments() 59 |

60 |
61 | 62 |
63 |

Prototype

64 |
65 | 66 | Node[] getNodes(); 67 | 68 |
69 |
70 |

returns

71 |

Nodes[] 72 |

73 |
74 | 75 |
76 |
77 |

Authors

78 | 79 |
80 |
81 |

Copyright

82 |

(C) 2016 Martin Brzenska 83 |

84 | 85 |
86 |
87 |

License

88 |

Distributed under the terms of the MIT license. 89 | Consult the provided LICENSE.md file for details 90 |

91 | 92 |
93 |
94 | 95 | -------------------------------------------------------------------------------- /docs/libdominator/Dominator/Dominator.getStartElement.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Dominator.getStartElement 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Dominator.getStartElement

55 |
56 |

gets the Tag Name of the Node 57 |

58 |
59 | 60 |
61 |

Prototype

62 |
63 | 64 | string getStartElement( 65 |
66 |   Node node 67 |
68 | ); 69 |
70 |
71 |
72 |

Parameters

73 | 74 | 75 |
NameDescription
node The Node to get the Tag Name from
76 |
77 |

Returns

78 |

The Tag Name as string 79 |

80 |
81 | 82 |
83 |
84 |

Authors

85 | 86 |
87 |
88 |

Copyright

89 |

(C) 2016 Martin Brzenska 90 |

91 | 92 |
93 |
94 |

License

95 |

Distributed under the terms of the MIT license. 96 | Consult the provided LICENSE.md file for details 97 |

98 | 99 |
100 |
101 | 102 | -------------------------------------------------------------------------------- /docs/libdominator/Dominator/Dominator.load.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Dominator.load 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Dominator.load

55 |
56 |

loads a Document 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | Dominator load( 64 |
65 |   string haystack 66 |
67 | ); 68 |
69 |
70 |
71 |

Parameters

72 | 73 | 74 |
NameDescription
haystack the Document String
75 |
76 | 77 |
78 |
79 |

Authors

80 | 81 |
82 |
83 |

Copyright

84 |

(C) 2016 Martin Brzenska 85 |

86 | 87 |
88 |
89 |

License

90 |

Distributed under the terms of the MIT license. 91 | Consult the provided LICENSE.md file for details 92 |

93 | 94 |
95 |
96 | 97 | -------------------------------------------------------------------------------- /docs/libdominator/Dominator/Dominator.stripTags.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dominator.stripTags - multiple declarations 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Dominator.stripTags - multiple declarations

55 | 59 |
60 |

Function Dominator.stripTags

61 |

Removes tags and returns plain inner content 62 |

63 | 64 |
65 |

Prototype

66 |
67 | 68 | string stripTags( 69 |
70 |   Node node 71 |
72 | ); 73 |
74 |
75 |
76 | 77 |
78 |
79 |

Function Dominator.stripTags

80 |

Removes tags and returns plain inner content 81 |

82 | 83 |
84 |

Prototype

85 |
86 | 87 | string stripTags(); 88 | 89 |
90 |
91 |

Example

92 |
const string content = `<div><h2>bla</h2><p>fasel</p></div>`;
 93 | Dominator dom = new Dominator(content);
 94 | assert( dom.stripTags() == "blafasel");
 95 | }
 96 | 
97 |
98 | 99 |
100 |
101 |

Authors

102 | 103 |
104 |
105 |

Copyright

106 |

(C) 2016 Martin Brzenska 107 |

108 | 109 |
110 |
111 |

License

112 |

Distributed under the terms of the MIT license. 113 | Consult the provided LICENSE.md file for details 114 |

115 | 116 |
117 |
118 | 119 | -------------------------------------------------------------------------------- /docs/libdominator/Dominator/Dominator.this.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dominator.this - multiple declarations 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Dominator.this - multiple declarations

55 | 59 |
60 |

Function Dominator.this

61 |

Instantiate empty Dominator 62 |

63 | 64 |
65 |

Prototype

66 |
67 | 68 | this(); 69 | 70 |
71 |
72 | 73 |
74 |
75 |

Function Dominator.this

76 |

Instantiate object and load the Document 77 |

78 | 79 |
80 |

Prototype

81 |
82 | 83 | this( 84 |
85 |   string haystack 86 |
87 | ); 88 |
89 |
90 |
91 | 92 |
93 |
94 |

Authors

95 | 96 |
97 |
98 |

Copyright

99 |

(C) 2016 Martin Brzenska 100 |

101 | 102 |
103 |
104 |

License

105 |

Distributed under the terms of the MIT license. 106 | Consult the provided LICENSE.md file for details 107 |

108 | 109 |
110 |
111 | 112 | -------------------------------------------------------------------------------- /docs/libdominator/Filter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Module libdominator.Filter 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Module libdominator.Filter

55 |

56 | 57 |
58 |
59 |

Functions

60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 72 | 74 | 75 | 76 | 81 | 83 | 84 | 85 | 90 | 92 | 93 | 94 | 99 | 101 | 102 | 103 | 108 | 110 | 111 |
NameDescription
68 | 69 | filterComments 70 | 71 | throws the nodes away which are inside of a comment 73 |
77 | 78 | filterDom 79 | 80 | Filters the given DOM and returns the nodes, that matches the given filter expression 82 |
86 | 87 | filterDom 88 | 89 | Filters the given DOM and returns the nodes, that matches the given filter expressions 91 |
95 | 96 | filterDom 97 | 98 | Filters the given nodes and returns the nodes, that matches the given filter expressions 100 |
104 | 105 | filterDom 106 | 107 | Filters the given nodes and returns the nodes, that matches the given filter expression 109 |
112 |
113 |
114 |

Structs

115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 127 | 129 | 130 | 131 | 136 | 138 | 139 |
NameDescription
123 | 124 | DomFilter 125 | 126 | Use this to filter html 128 |
132 | 133 | TagElement 134 | 135 | The TagElement is the struct for the atomic part of a filter expression. 137 |
140 |
141 |
142 |

Authors

143 | 144 |
145 |
146 |

Copyright

147 |

(C) 2016 Martin Brzenska 148 |

149 | 150 |
151 |
152 |

License

153 |

Distributed under the terms of the MIT license. 154 | Consult the provided LICENSE.md file for details 155 |

156 | 157 |
158 |
159 | 160 | -------------------------------------------------------------------------------- /docs/libdominator/Filter/DomFilter.empty.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function DomFilter.empty 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function DomFilter.empty

55 |
56 |

Checks if there are any TagElements. 57 | in other words: Checks if the DomFilter is loaded with some filterarguments or not. 58 |

59 | 60 |
61 |

Prototype

62 |
63 | 64 | bool empty(); 65 | 66 |
67 |
68 | 69 |
70 |
71 |

Authors

72 | 73 |
74 |
75 |

Copyright

76 |

(C) 2016 Martin Brzenska 77 |

78 | 79 |
80 |
81 |

License

82 |

Distributed under the terms of the MIT license. 83 | Consult the provided LICENSE.md file for details 84 |

85 | 86 |
87 |
88 | 89 | -------------------------------------------------------------------------------- /docs/libdominator/Filter/DomFilter.followers.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function DomFilter.followers 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function DomFilter.followers

55 |
56 |

The number of following TagElements after the current TagElement 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | ulong followers(); 64 | 65 |
66 |
67 | 68 |
69 |
70 |

Authors

71 | 72 |
73 |
74 |

Copyright

75 |

(C) 2016 Martin Brzenska 76 |

77 | 78 |
79 |
80 |

License

81 |

Distributed under the terms of the MIT license. 82 | Consult the provided LICENSE.md file for details 83 |

84 | 85 |
86 |
87 | 88 | -------------------------------------------------------------------------------- /docs/libdominator/Filter/DomFilter.front.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function DomFilter.front 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function DomFilter.front

55 |
56 |

The current TagElement, which is under the cursor. 57 | if there is no TagElement, then a empty TagElement will be returned. 58 |

59 | 60 |
61 |

Prototype

62 |
63 | 64 | TagElement front(); 65 | 66 |
67 |
68 | 69 |
70 |
71 |

Authors

72 | 73 |
74 |
75 |

Copyright

76 |

(C) 2016 Martin Brzenska 77 |

78 | 79 |
80 |
81 |

License

82 |

Distributed under the terms of the MIT license. 83 | Consult the provided LICENSE.md file for details 84 |

85 | 86 |
87 |
88 | 89 | -------------------------------------------------------------------------------- /docs/libdominator/Filter/DomFilter.next.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function DomFilter.next 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function DomFilter.next

55 |
56 |

Moves the cursor to the next TagElement if exists 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | bool next(); 64 | 65 |
66 |
67 |

Returns

68 |

true if the cursor could be moved, otherwise false 69 |

70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Filter/DomFilter.opApply.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function DomFilter.opApply 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function DomFilter.opApply

55 |
56 |

opApply on TagElements 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | int opApply( 64 |
65 |   int delegate(ref TagElement) dg 66 |
67 | ); 68 |
69 |
70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Filter/DomFilter.parseAttributexpression.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function DomFilter.parseAttributexpression 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function DomFilter.parseAttributexpression

55 |
56 |

parses the attribute filter expression and boxes it into an handy array of Attribute 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | Attribute[] parseAttributexpression( 64 |
65 |   string expression 66 |
67 | ); 68 |
69 |
70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Filter/DomFilter.this.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DomFilter.this - multiple declarations 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

DomFilter.this - multiple declarations

55 | 59 |
60 |

Function DomFilter.this

61 |

A dominator specific array of filter expressions 62 |

63 | 64 |
65 |

Prototype

66 |
67 | 68 | ref this( 69 |
70 |   string[] expressions 71 |
72 | ); 73 |
74 |
75 |
76 | 77 |
78 |
79 |

Function DomFilter.this

80 |

A dominator specific filter expression 81 |

82 | 83 |
84 |

Prototype

85 |
86 | 87 | ref this( 88 |
89 |   string expression 90 |
91 | ); 92 |
93 |
94 |
95 | 96 |
97 |
98 |

Authors

99 | 100 |
101 |
102 |

Copyright

103 |

(C) 2016 Martin Brzenska 104 |

105 | 106 |
107 |
108 |

License

109 |

Distributed under the terms of the MIT license. 110 | Consult the provided LICENSE.md file for details 111 |

112 | 113 |
114 |
115 | 116 | -------------------------------------------------------------------------------- /docs/libdominator/Filter/TagElement.has.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function TagElement.has 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function TagElement.has

55 |
56 |

checks if the TagElement matches the given pick 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | bool has( 64 |
65 |   ulong pick 66 |
67 | ); 68 |
69 |
70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Filter/TagElement.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Struct TagElement 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Struct TagElement

55 |
56 |

The TagElement is the struct for the atomic part of a filter expression. 57 |

58 | 59 |
60 |

Methods

61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 73 | 75 | 76 |
NameDescription
69 | 70 | has 71 | 72 | checks if the TagElement matches the given pick 74 |
77 |
78 |

Examples

79 |
a[1]{class:someClass}
80 |
81 | 82 |
83 |
84 |

Authors

85 | 86 |
87 |
88 |

Copyright

89 |

(C) 2016 Martin Brzenska 90 |

91 | 92 |
93 |
94 |

License

95 |

Distributed under the terms of the MIT license. 96 | Consult the provided LICENSE.md file for details 97 |

98 | 99 |
100 |
101 | 102 | -------------------------------------------------------------------------------- /docs/libdominator/Filter/filterComments.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function filterComments 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function filterComments

55 |
56 |

throws the nodes away which are inside of a comment 57 |

58 | 59 |
60 |

Prototypes

61 |
62 | 63 | Node[] filterComments( 64 |
65 |   Node[] nodes 66 |
67 | ); 68 |
69 |
70 | Node[] filterComments( 71 |
72 |   Dominator dom 73 |
74 | ); 75 |
76 |
77 |
78 |

Returns

79 |

Node[] 80 |

81 |
82 | 83 |
84 |
85 |

Authors

86 | 87 |
88 |
89 |

Copyright

90 |

(C) 2016 Martin Brzenska 91 |

92 | 93 |
94 |
95 |

License

96 |

Distributed under the terms of the MIT license. 97 | Consult the provided LICENSE.md file for details 98 |

99 | 100 |
101 |
102 | 103 | -------------------------------------------------------------------------------- /docs/libdominator/Node.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Module libdominator.Node 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Module libdominator.Node

55 |

56 | 57 |
58 |
59 |

Classes

60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 72 | 74 | 75 |
NameDescription
68 | 69 | Node 70 | 71 | Represents a node in a DOM 73 |
76 |
77 |
78 |

Authors

79 | 80 |
81 |
82 |

Copyright

83 |

(C) 2016 Martin Brzenska 84 |

85 | 86 |
87 |
88 |

License

89 |

Distributed under the terms of the MIT license. 90 | Consult the provided LICENSE.md file for details 91 |

92 | 93 |
94 |
95 | 96 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.addAttribute.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.addAttribute 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.addAttribute

55 |
56 |

Does what the name says 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | void addAttribute( 64 |
65 |   Attribute attribute 66 |
67 | ); 68 |
69 |
70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.addChild.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.addChild 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.addChild

55 |
56 |

Adds a node as a child node 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | void addChild( 64 |
65 |   Node* pNode 66 |
67 | ); 68 |
69 |
70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.getAttributes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.getAttributes 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.getAttributes

55 |
56 |

Does what the name says 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | Attribute[] getAttributes(); 64 | 65 |
66 |
67 | 68 |
69 |
70 |

Authors

71 | 72 |
73 |
74 |

Copyright

75 |

(C) 2016 Martin Brzenska 76 |

77 | 78 |
79 |
80 |

License

81 |

Distributed under the terms of the MIT license. 82 | Consult the provided LICENSE.md file for details 83 |

84 | 85 |
86 |
87 | 88 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.getChildren.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.getChildren 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.getChildren

55 |
56 |

Does what the name says 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | Node[] getChildren(); 64 | 65 |
66 |
67 | 68 |
69 |
70 |

Authors

71 | 72 |
73 |
74 |

Copyright

75 |

(C) 2016 Martin Brzenska 76 |

77 | 78 |
79 |
80 |

License

81 |

Distributed under the terms of the MIT license. 82 | Consult the provided LICENSE.md file for details 83 |

84 | 85 |
86 |
87 | 88 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.getEndPosition.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.getEndPosition 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.getEndPosition

55 |
56 |

Does what the name says 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | uint getEndPosition(); 64 | 65 |
66 |
67 | 68 |
69 |
70 |

Authors

71 | 72 |
73 |
74 |

Copyright

75 |

(C) 2016 Martin Brzenska 76 |

77 | 78 |
79 |
80 |

License

81 |

Distributed under the terms of the MIT license. 82 | Consult the provided LICENSE.md file for details 83 |

84 | 85 |
86 |
87 | 88 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.getEndTagLength.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.getEndTagLength 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.getEndTagLength

55 |
56 |

Does what the name says 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | ushort getEndTagLength(); 64 | 65 |
66 |
67 | 68 |
69 |
70 |

Authors

71 | 72 |
73 |
74 |

Copyright

75 |

(C) 2016 Martin Brzenska 76 |

77 | 78 |
79 |
80 |

License

81 |

Distributed under the terms of the MIT license. 82 | Consult the provided LICENSE.md file for details 83 |

84 | 85 |
86 |
87 | 88 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.getParent.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.getParent 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.getParent

55 |
56 |

Does what the name says 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | Node getParent(); 64 | 65 |
66 |
67 | 68 |
69 |
70 |

Authors

71 | 72 |
73 |
74 |

Copyright

75 |

(C) 2016 Martin Brzenska 76 |

77 | 78 |
79 |
80 |

License

81 |

Distributed under the terms of the MIT license. 82 | Consult the provided LICENSE.md file for details 83 |

84 | 85 |
86 |
87 | 88 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.getSiblings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.getSiblings 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.getSiblings

55 |
56 |

Does what the name says 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | Node[] getSiblings(); 64 | 65 |
66 |
67 | 68 |
69 |
70 |

Authors

71 | 72 |
73 |
74 |

Copyright

75 |

(C) 2016 Martin Brzenska 76 |

77 | 78 |
79 |
80 |

License

81 |

Distributed under the terms of the MIT license. 82 | Consult the provided LICENSE.md file for details 83 |

84 | 85 |
86 |
87 | 88 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.getStartPosition.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.getStartPosition 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.getStartPosition

55 |
56 |

Does what the name says 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | uint getStartPosition(); 64 | 65 |
66 |
67 | 68 |
69 |
70 |

Authors

71 | 72 |
73 |
74 |

Copyright

75 |

(C) 2016 Martin Brzenska 76 |

77 | 78 |
79 |
80 |

License

81 |

Distributed under the terms of the MIT license. 82 | Consult the provided LICENSE.md file for details 83 |

84 | 85 |
86 |
87 | 88 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.getStartTagLength.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.getStartTagLength 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.getStartTagLength

55 |
56 |

Does what the name says 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | ushort getStartTagLength(); 64 | 65 |
66 |
67 | 68 |
69 |
70 |

Authors

71 | 72 |
73 |
74 |

Copyright

75 |

(C) 2016 Martin Brzenska 76 |

77 | 78 |
79 |
80 |

License

81 |

Distributed under the terms of the MIT license. 82 | Consult the provided LICENSE.md file for details 83 |

84 | 85 |
86 |
87 | 88 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.getTag.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.getTag 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.getTag

55 |
56 |

Does what the name says 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | string getTag(); 64 | 65 |
66 |
67 | 68 |
69 |
70 |

Authors

71 | 72 |
73 |
74 |

Copyright

75 |

(C) 2016 Martin Brzenska 76 |

77 | 78 |
79 |
80 |

License

81 |

Distributed under the terms of the MIT license. 82 | Consult the provided LICENSE.md file for details 83 |

84 | 85 |
86 |
87 | 88 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.hasChildren.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.hasChildren 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.hasChildren

55 |
56 |

57 | 58 |
59 |

Prototype

60 |
61 | 62 | ulong hasChildren(); 63 | 64 |
65 |
66 |

Returns

67 |

true if the node has children nodes. 68 |

69 |
70 | 71 |
72 |
73 |

Authors

74 | 75 |
76 |
77 |

Copyright

78 |

(C) 2016 Martin Brzenska 79 |

80 | 81 |
82 |
83 |

License

84 |

Distributed under the terms of the MIT license. 85 | Consult the provided LICENSE.md file for details 86 |

87 | 88 |
89 |
90 | 91 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.hasParent.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.hasParent 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.hasParent

55 |
56 |

57 | 58 |
59 |

Prototype

60 |
61 | 62 | bool hasParent(); 63 | 64 |
65 |
66 |

Returns

67 |

true if the node has a parent node. 68 |

69 |
70 | 71 |
72 |
73 |

Authors

74 | 75 |
76 |
77 |

Copyright

78 |

(C) 2016 Martin Brzenska 79 |

80 | 81 |
82 |
83 |

License

84 |

Distributed under the terms of the MIT license. 85 | Consult the provided LICENSE.md file for details 86 |

87 | 88 |
89 |
90 | 91 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.isComment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Node.isComment - multiple declarations 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Node.isComment - multiple declarations

55 | 59 |
60 |

Function Node.isComment

61 |

Markes this node to be inside of a comment 62 |

63 | 64 |
65 |

Prototype

66 |
67 | 68 | Node isComment( 69 |
70 |   bool sw 71 |
72 | ); 73 |
74 |
75 |
76 | 77 |
78 |
79 |

Function Node.isComment

80 |

81 | 82 |
83 |

Prototype

84 |
85 | 86 | bool isComment(); 87 | 88 |
89 |
90 |

Returns

91 |

true if the node is marked to be inside of a comment, otherwise false. 92 |

93 |
94 | 95 |
96 |
97 |

Authors

98 | 99 |
100 |
101 |

Copyright

102 |

(C) 2016 Martin Brzenska 103 |

104 | 105 |
106 |
107 |

License

108 |

Distributed under the terms of the MIT license. 109 | Consult the provided LICENSE.md file for details 110 |

111 | 112 |
113 |
114 | 115 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.setEndPosition.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.setEndPosition 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.setEndPosition

55 |
56 |

Sets the position in the document where this node ends 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | Node setEndPosition(T)( 64 |
65 |   T position 66 |
67 | ); 68 |
69 |
70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.setEndTagLength.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.setEndTagLength 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.setEndTagLength

55 |
56 |

Does what the name says 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | Node setEndTagLength(T)( 64 |
65 |   T length 66 |
67 | ); 68 |
69 |
70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.setParent.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.setParent 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.setParent

55 |
56 |

Sets the given node as the parent node 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | void setParent( 64 |
65 |   Node* pNode 66 |
67 | ); 68 |
69 |
70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.setStartPosition.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.setStartPosition 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.setStartPosition

55 |
56 |

Sets the position in the document where this node begins 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | Node setStartPosition(T)( 64 |
65 |   T position 66 |
67 | ); 68 |
69 |
70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.setStartTagLength.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.setStartTagLength 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.setStartTagLength

55 |
56 |

Does what the name says 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | Node setStartTagLength(T)( 64 |
65 |   T length 66 |
67 | ); 68 |
69 |
70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.setTag.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function Node.setTag 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function Node.setTag

55 |
56 |

Sets the tagname 57 |

58 | 59 |
60 |

Prototype

61 |
62 | 63 | Node setTag( 64 |
65 |   string tag 66 |
67 | ); 68 |
69 |
70 |
71 | 72 |
73 |
74 |

Authors

75 | 76 |
77 |
78 |

Copyright

79 |

(C) 2016 Martin Brzenska 80 |

81 | 82 |
83 |
84 |

License

85 |

Distributed under the terms of the MIT license. 86 | Consult the provided LICENSE.md file for details 87 |

88 | 89 |
90 |
91 | 92 | -------------------------------------------------------------------------------- /docs/libdominator/Node/Node.this.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Node.this - multiple declarations 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Node.this - multiple declarations

55 | 60 |
61 |

Function Node.this

62 |

Makes a naked node object 63 |

64 | 65 |
66 |

Prototype

67 |
68 | 69 | this(); 70 | 71 |
72 |
73 | 74 |
75 |
76 |

Function Node.this

77 |

Makes a node with a given tagname 78 |

79 | 80 |
81 |

Prototype

82 |
83 | 84 | this( 85 |
86 |   string tag 87 |
88 | ); 89 |
90 |
91 |
92 | 93 |
94 |
95 |

Function Node.this

96 |

Makes a node with a given tagname and with the information for the position in the Document 97 |

98 | 99 |
100 |

Prototype

101 |
102 | 103 | this(T)( 104 |
105 |   string tag, 106 |
107 |   T startPosition 108 |
109 | ); 110 |
111 |
112 |
113 | 114 |
115 |
116 |

Authors

117 | 118 |
119 |
120 |

Copyright

121 |

(C) 2016 Martin Brzenska 122 |

123 | 124 |
125 |
126 |

License

127 |

Distributed under the terms of the MIT license. 128 | Consult the provided LICENSE.md file for details 129 |

130 | 131 |
132 |
133 | 134 | -------------------------------------------------------------------------------- /docs/libdominator/Output.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Module libdominator.Output 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Module libdominator.Output

55 |

56 | 57 |
58 |
59 |

Functions

60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 72 | 75 | 76 |
NameDescription
68 | 69 | nodeOutputItems 70 | 71 | Builds a output string. 73 | This is usefull for formating output for the command-line. 74 |
77 |
78 |
79 |

Authors

80 | 81 |
82 |
83 |

Copyright

84 |

(C) 2016 Martin Brzenska 85 |

86 | 87 |
88 |
89 |

License

90 |

Distributed under the terms of the MIT license. 91 | Consult the provided LICENSE.md file for details 92 |

93 | 94 |
95 |
96 | 97 | -------------------------------------------------------------------------------- /docs/libdominator/Output/nodeOutputItems.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Function nodeOutputItems 6 | 7 | 8 | 9 | 10 | 11 | 12 | 53 |
54 |

Function nodeOutputItems

55 |
56 |

Builds a output string. 57 | This is usefull for formating output for the command-line. 58 |

59 | 60 |
61 |

Prototype

62 |
63 | 64 | string[] nodeOutputItems( 65 |
66 |   ref Dominator dom, 67 |
68 |   Node node, 69 |
70 |   string[] optOutItems 71 |
72 | ); 73 |
74 |
75 |
76 |

Parameters

77 | 78 | 79 | 80 | 81 |
NameDescription
dom The DOM Object
node A node, that is part of dom
optOutItems Defines the output contents
82 |
83 | 84 |
85 |
86 |

Authors

87 | 88 |
89 |
90 |

Copyright

91 |

(C) 2016 Martin Brzenska 92 |

93 | 94 |
95 |
96 |

License

97 |

Distributed under the terms of the MIT license. 98 | Consult the provided LICENSE.md file for details 99 |

100 | 101 |
102 |
103 | 104 | -------------------------------------------------------------------------------- /docs/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libdominator 5 | 6 |

libdominator

7 | License:
8 | Distributed under the terms of the MIT license. 9 | Consult the provided LICENSE.md file for details

10 | 11 | 12 |
Page generated by Ddoc. (C) 2016 Martin Brzenska 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/prettify/prettify.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. */ 2 | 3 | /* SPAN elements with the classes below are added by prettyprint. */ 4 | .pln { color: #222 } /* plain text */ 5 | pre .pln, div.prototype .pln { color: #fff } /* plain text */ 6 | 7 | @media screen { 8 | pre .str { color: #ffe7b6 } /* string content */ 9 | pre .typ { color: #9ad452 } /* a type name */ 10 | pre .lit { color: #ffe7b6 } /* a literal value */ 11 | pre .pun, div.prototype .pun { color: #fff } 12 | 13 | .spc { color: #a0a } /* special token sequence */ 14 | .str { color: #842 } /* string content */ 15 | .kwd { color: #ffaa00 } /* a keyword */ 16 | .com { color: #888 } /* a comment */ 17 | .typ { color: #693 } /* a type name */ 18 | .lit { color: #875 } /* a literal value */ 19 | /* punctuation, lisp open bracket, lisp close bracket */ 20 | .pun, .opn, .clo { color: #222 } 21 | .tag { color: #ffaa00 } /* a markup tag name */ 22 | .atn { color: #9ad452 } /* a markup attribute name */ 23 | .atv { color: #ffe7b6 } /* a markup attribute value */ 24 | .dec, .var { color: #aaa } /* a declaration; a variable name */ 25 | .fun { color: red } /* a function name */ 26 | } 27 | 28 | /* Use higher contrast and text-weight for printable form. */ 29 | @media print, projection { 30 | .spc { color: #606 } /* special token sequence */ 31 | .str { color: #060 } 32 | .kwd { color: #006; font-weight: bold } 33 | .com { color: #600; font-style: italic } 34 | .typ { color: #404; font-weight: bold } 35 | .lit { color: #044 } 36 | .pun, .opn, .clo { color: #440 } 37 | .tag { color: #006; font-weight: bold } 38 | .atn { color: #404 } 39 | .atv { color: #060 } 40 | } 41 | 42 | /* Put a border around prettyprinted code snippets. */ 43 | pre.prettyprint, pre.code, div.prototype { 44 | padding: 1em 0; 45 | background-color: #222; 46 | border: 1px solid black; 47 | color: white; 48 | } 49 | 50 | /* Specify class=linenums on a pre to get line numbering */ 51 | ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ 52 | li.L0, 53 | li.L1, 54 | li.L2, 55 | li.L3, 56 | li.L5, 57 | li.L6, 58 | li.L7, 59 | li.L8 { list-style-type: none } 60 | /* Alternate shading for lines */ 61 | li.L1, 62 | li.L3, 63 | li.L5, 64 | li.L7, 65 | li.L9 { background: #222222 } 66 | -------------------------------------------------------------------------------- /docs/scripts/ddox.js: -------------------------------------------------------------------------------- 1 | function setupDdox() 2 | { 3 | $(".tree-view").children(".package").click(toggleTree); 4 | $(".tree-view.collapsed").children("ul").hide(); 5 | $("#symbolSearch").attr("tabindex", "1000"); 6 | } 7 | 8 | function toggleTree() 9 | { 10 | node = $(this).parent(); 11 | node.toggleClass("collapsed"); 12 | if( node.hasClass("collapsed") ){ 13 | node.children("ul").hide(); 14 | } else { 15 | node.children("ul").show(); 16 | } 17 | return false; 18 | } 19 | 20 | var searchCounter = 0; 21 | var lastSearchString = ""; 22 | 23 | function performSymbolSearch(maxlen) 24 | { 25 | if (maxlen === 'undefined') maxlen = 26; 26 | 27 | var searchstring = $("#symbolSearch").val().toLowerCase(); 28 | 29 | if (searchstring == lastSearchString) return; 30 | lastSearchString = searchstring; 31 | 32 | var scnt = ++searchCounter; 33 | $('#symbolSearchResults').hide(); 34 | $('#symbolSearchResults').empty(); 35 | 36 | var terms = $.trim(searchstring).split(/\s+/); 37 | if (terms.length == 0 || (terms.length == 1 && terms[0].length < 2)) return; 38 | 39 | var results = []; 40 | for (i in symbols) { 41 | var sym = symbols[i]; 42 | var all_match = true; 43 | for (j in terms) 44 | if (sym.name.toLowerCase().indexOf(terms[j]) < 0) { 45 | all_match = false; 46 | break; 47 | } 48 | if (!all_match) continue; 49 | 50 | results.push(sym); 51 | } 52 | 53 | function compare(a, b) { 54 | // prefer non-deprecated matches 55 | var adep = a.attributes.indexOf("deprecated") >= 0; 56 | var bdep = b.attributes.indexOf("deprecated") >= 0; 57 | if (adep != bdep) return adep - bdep; 58 | 59 | // normalize the names 60 | var aname = a.name.toLowerCase(); 61 | var bname = b.name.toLowerCase(); 62 | 63 | var anameparts = aname.split("."); 64 | var bnameparts = bname.split("."); 65 | 66 | var asname = anameparts[anameparts.length-1]; 67 | var bsname = bnameparts[bnameparts.length-1]; 68 | 69 | // prefer exact matches 70 | var aexact = terms.indexOf(asname) >= 0; 71 | var bexact = terms.indexOf(bsname) >= 0; 72 | if (aexact != bexact) return bexact - aexact; 73 | 74 | // prefer elements with less nesting 75 | if (anameparts.length < bnameparts.length) return -1; 76 | if (anameparts.length > bnameparts.length) return 1; 77 | 78 | // prefer matches with a shorter name 79 | if (asname.length < bsname.length) return -1; 80 | if (asname.length > bsname.length) return 1; 81 | 82 | // sort the rest alphabetically 83 | if (aname < bname) return -1; 84 | if (aname > bname) return 1; 85 | return 0; 86 | } 87 | 88 | results.sort(compare); 89 | 90 | for (i = 0; i < results.length && i < 100; i++) { 91 | var sym = results[i]; 92 | 93 | var el = $(document.createElement("li")); 94 | el.addClass(sym.kind); 95 | for (j in sym.attributes) 96 | el.addClass(sym.attributes[j]); 97 | 98 | var name = sym.name; 99 | 100 | // compute a length limited representation of the full name 101 | var nameparts = name.split("."); 102 | var np = nameparts.length-1; 103 | var shortname = "." + nameparts[np]; 104 | while (np > 0 && nameparts[np-1].length + shortname.length <= maxlen) { 105 | np--; 106 | shortname = "." + nameparts[np] + shortname; 107 | } 108 | if (np > 0) shortname = ".." + shortname; 109 | else shortname = shortname.substr(1); 110 | 111 | el.append(''+shortname+''); 112 | $('#symbolSearchResults').append(el); 113 | } 114 | 115 | if (results.length > 100) { 116 | $('#symbolSearchResults').append("
  • …"+(results.length-100)+" additional results
  • "); 117 | } 118 | 119 | $('#symbolSearchResults').show(); 120 | } 121 | -------------------------------------------------------------------------------- /docs/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | http://127.0.0.1/index.html 4 | http://127.0.0.1/libdominator/Attribute.html 5 | http://127.0.0.1/libdominator/Attribute/Attribute.html 6 | http://127.0.0.1/libdominator/Attribute/Attribute.matches.html 7 | http://127.0.0.1/libdominator/Attribute/Attribute.matchesKey.html 8 | http://127.0.0.1/libdominator/Attribute/Attribute.matchesValue.html 9 | http://127.0.0.1/libdominator/Attribute/Attribute.this.html 10 | http://127.0.0.1/libdominator/Attribute/Attribute.this.html 11 | http://127.0.0.1/libdominator/Dominator.html 12 | http://127.0.0.1/libdominator/Dominator/Dominator.html 13 | http://127.0.0.1/libdominator/Dominator/Dominator.getElelment.html 14 | http://127.0.0.1/libdominator/Dominator/Dominator.getInner.html 15 | http://127.0.0.1/libdominator/Dominator/Dominator.getNodes.html 16 | http://127.0.0.1/libdominator/Dominator/Dominator.getStartElement.html 17 | http://127.0.0.1/libdominator/Dominator/Dominator.load.html 18 | http://127.0.0.1/libdominator/Dominator/Dominator.stripTags.html 19 | http://127.0.0.1/libdominator/Dominator/Dominator.stripTags.html 20 | http://127.0.0.1/libdominator/Dominator/Dominator.this.html 21 | http://127.0.0.1/libdominator/Dominator/Dominator.this.html 22 | http://127.0.0.1/libdominator/Filter.html 23 | http://127.0.0.1/libdominator/Filter/DomFilter.html 24 | http://127.0.0.1/libdominator/Filter/DomFilter.empty.html 25 | http://127.0.0.1/libdominator/Filter/DomFilter.followers.html 26 | http://127.0.0.1/libdominator/Filter/DomFilter.front.html 27 | http://127.0.0.1/libdominator/Filter/DomFilter.next.html 28 | http://127.0.0.1/libdominator/Filter/DomFilter.opApply.html 29 | http://127.0.0.1/libdominator/Filter/DomFilter.parseAttributexpression.html 30 | http://127.0.0.1/libdominator/Filter/DomFilter.this.html 31 | http://127.0.0.1/libdominator/Filter/DomFilter.this.html 32 | http://127.0.0.1/libdominator/Filter/filterComments.html 33 | http://127.0.0.1/libdominator/Filter/filterComments.html 34 | http://127.0.0.1/libdominator/Filter/filterDom.html 35 | http://127.0.0.1/libdominator/Filter/filterDom.html 36 | http://127.0.0.1/libdominator/Filter/filterDom.html 37 | http://127.0.0.1/libdominator/Filter/filterDom.html 38 | http://127.0.0.1/libdominator/Filter/filterDom.html 39 | http://127.0.0.1/libdominator/Filter/filterDom.html 40 | http://127.0.0.1/libdominator/Filter/TagElement.html 41 | http://127.0.0.1/libdominator/Filter/TagElement.has.html 42 | http://127.0.0.1/libdominator/Node.html 43 | http://127.0.0.1/libdominator/Node/Node.html 44 | http://127.0.0.1/libdominator/Node/Node.addAttribute.html 45 | http://127.0.0.1/libdominator/Node/Node.addChild.html 46 | http://127.0.0.1/libdominator/Node/Node.getAttributes.html 47 | http://127.0.0.1/libdominator/Node/Node.getChildren.html 48 | http://127.0.0.1/libdominator/Node/Node.getEndPosition.html 49 | http://127.0.0.1/libdominator/Node/Node.getEndTagLength.html 50 | http://127.0.0.1/libdominator/Node/Node.getParent.html 51 | http://127.0.0.1/libdominator/Node/Node.getSiblings.html 52 | http://127.0.0.1/libdominator/Node/Node.getStartPosition.html 53 | http://127.0.0.1/libdominator/Node/Node.getStartTagLength.html 54 | http://127.0.0.1/libdominator/Node/Node.getTag.html 55 | http://127.0.0.1/libdominator/Node/Node.hasChildren.html 56 | http://127.0.0.1/libdominator/Node/Node.hasParent.html 57 | http://127.0.0.1/libdominator/Node/Node.isComment.html 58 | http://127.0.0.1/libdominator/Node/Node.isComment.html 59 | http://127.0.0.1/libdominator/Node/Node.setEndPosition.html 60 | http://127.0.0.1/libdominator/Node/Node.setEndTagLength.html 61 | http://127.0.0.1/libdominator/Node/Node.setParent.html 62 | http://127.0.0.1/libdominator/Node/Node.setStartPosition.html 63 | http://127.0.0.1/libdominator/Node/Node.setStartTagLength.html 64 | http://127.0.0.1/libdominator/Node/Node.setTag.html 65 | http://127.0.0.1/libdominator/Node/Node.this.html 66 | http://127.0.0.1/libdominator/Node/Node.this.html 67 | http://127.0.0.1/libdominator/Node/Node.this.html 68 | http://127.0.0.1/libdominator/Output.html 69 | http://127.0.0.1/libdominator/Output/nodeOutputItems.html 70 | http://127.0.0.1/libdominator.html 71 | 72 | -------------------------------------------------------------------------------- /docs/styles/ddox.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: "Lucida Sans Unicode", "Lucida Grande", "Open Sans", sans-serif; 5 | font-size: 0; 6 | } 7 | 8 | h1 { margin-top: 0; } 9 | 10 | a { 11 | color: #13e; 12 | text-decoration: none; 13 | } 14 | 15 | a:hover { 16 | color: #24f; 17 | } 18 | 19 | #main-nav { 20 | -webkit-box-sizing: border-box; 21 | -moz-box-sizing: border-box; 22 | box-sizing: border-box; 23 | display: inline-block; 24 | vertical-align: top; 25 | font-size: 9.5pt; 26 | min-width: 10em; 27 | width: 20%; 28 | padding: 2em 1em; 29 | border-right: 1px solid black; 30 | border-bottom: 1px solid black; 31 | background-color: #eee; 32 | } 33 | 34 | #main-contents { 35 | -webkit-box-sizing: border-box; 36 | -moz-box-sizing: border-box; 37 | box-sizing: border-box; 38 | display: inline-block; 39 | vertical-align: top; 40 | font-size: 9.5pt; 41 | width: 80%; 42 | padding: 2em; 43 | } 44 | 45 | table { 46 | border-collapse: collapse; 47 | } 48 | 49 | th { 50 | text-align: left; 51 | } 52 | 53 | td { 54 | border-top: 1px dashed #ddd; 55 | border-bottom: 1px dashed #ddd; 56 | vertical-align: top; 57 | } 58 | 59 | col.caption { 60 | width: 150pt; 61 | } 62 | 63 | ul.tree-view a.package { 64 | background-image: url(../images/ddox/package.png); 65 | background-repeat: no-repeat; 66 | background-position: left center; 67 | padding-left: 18px; 68 | padding-right: 4px; 69 | } 70 | 71 | ul.tree-view a.module { 72 | margin-left: 14px; 73 | padding: 0 4px; 74 | } 75 | 76 | ul.tree-view a.selected { 77 | background-color: #f8f8f8; 78 | margin-left: 13px; 79 | border: 1px solid #bbb; 80 | } 81 | 82 | ul.tree-view { 83 | padding: 0; 84 | margin: 0; 85 | } 86 | 87 | ul.tree-view ul { 88 | margin: 0; 89 | padding: 0; 90 | padding-left: 10pt; 91 | } 92 | 93 | ul.tree-view li { 94 | list-style-type: none; 95 | padding: 0; 96 | margin-left: 0; 97 | } 98 | 99 | a.protected { 100 | font-style: italic; 101 | background-image: url(../images/ddox/protected.png); 102 | background-repeat: no-repeat; 103 | padding-left: 16px; 104 | } 105 | a.package { 106 | font-style: italic; 107 | background-image: url(../images/ddox/package.png); 108 | background-repeat: no-repeat; 109 | padding-left: 16px; 110 | } 111 | a.private { 112 | font-style: italic; 113 | background-image: url(../images/ddox/private.png); 114 | background-repeat: no-repeat; 115 | padding-left: 16px; 116 | } 117 | a.inherited:after { content: url(../images/ddox/inherited.png); padding-left: 2pt; } 118 | 119 | #symbolSearchResults { 120 | list-style: none; 121 | padding: 0; 122 | overflow: hidden; 123 | } 124 | #symbolSearchResults li { 125 | background-repeat: no-repeat; 126 | background-position: left center; 127 | padding-left: 18px; 128 | } 129 | 130 | #symbolSearchResults .deprecated a { color: gray; } 131 | #symbolSearchResults .module { background-image: url(../images/ddox/module.png); } 132 | #symbolSearchResults .functiondeclaration { background-image: url(../images/ddox/function.png); } 133 | #symbolSearchResults .classdeclaration { background-image: url(../images/ddox/class.png); } 134 | #symbolSearchResults .interfacedeclaration { background-image: url(../images/ddox/interface.png); } 135 | #symbolSearchResults .structdeclaration { background-image: url(../images/ddox/struct.png); } 136 | #symbolSearchResults .variabledeclaration { background-image: url(../images/ddox/variable.png); } 137 | #symbolSearchResults .property { background-image: url(../images/ddox/property.png); } 138 | #symbolSearchResults .enumdeclaration { background-image: url(../images/ddox/enum.png); } 139 | #symbolSearchResults .enummemberdeclaration { background-image: url(../images/ddox/enummember.png); } 140 | #symbolSearchResults .aliasdeclaration { background-image: url(../images/ddox/alias.png); } 141 | #symbolSearchResults .templatedeclaration { background-image: url(../images/ddox/template.png); } 142 | -------------------------------------------------------------------------------- /dub.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "libdominator", 3 | "authors": [ 4 | "Martin Brzenska" 5 | ], 6 | "description": "A HTML Parser Library", 7 | "copyright": "Copyright © 2016, Martin Brzenska", 8 | "license": "MIT", 9 | "targetType": "library" 10 | } -------------------------------------------------------------------------------- /source/libdominator/Attribute.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright: 3 | * (C) 2016 Martin Brzenska 4 | * 5 | * License: 6 | * Distributed under the terms of the MIT license. 7 | * Consult the provided LICENSE.md file for details 8 | */ 9 | module libdominator.Attribute; 10 | 11 | import std.regex : regex , matchFirst ; 12 | import std.array : split; 13 | 14 | import libdominator; 15 | 16 | ///Struct for Node Attributes 17 | struct Attribute 18 | { 19 | string key; 20 | string[] values; 21 | 22 | /** 23 | * Params: 24 | * key = the Name of the Attribute (can be prefixed with '(regex)') 25 | * values = a whitespace serparated List of Attribute Values (each Value can be prefixed with '(regex)') 26 | */ 27 | this(string key, string values) 28 | { 29 | import std.string : toLower; 30 | this.key = toLower(key); 31 | this.values = split(values); 32 | } 33 | /** 34 | * Params: 35 | * key = The name of the attribute (can be prefixed with '(regex)') 36 | * values = Array of attribute values (each value can be prefixed with '(regex)') 37 | */ 38 | this(string key, string[] values) 39 | { 40 | import std.string : toLower; 41 | this.key = toLower(key); 42 | this.values = values; 43 | } 44 | 45 | ///Checks if the given node matches the attributes given key 46 | bool matchesKey(Node node) 47 | { 48 | if (key.length > 6 && key[0..7] == "(regex)") 49 | { 50 | auto regx = regex(key[7..$]); 51 | foreach (Attribute attrib; node.getAttributes()) 52 | { 53 | auto capture = matchFirst(attrib.key, regx); 54 | if (!capture.empty) 55 | { 56 | return true; 57 | } 58 | } 59 | } 60 | else 61 | { 62 | foreach (Attribute attrib; node.getAttributes()) 63 | { 64 | if (attrib.key == key) 65 | { 66 | return true; 67 | } 68 | } 69 | } 70 | return false; 71 | } 72 | ///Checks if at least one of the attribute values of the given node matches the given attribute values 73 | bool matchesValue(Node node) 74 | { 75 | if (values.length == 0) 76 | { 77 | return true; 78 | } 79 | ubyte hitCount; 80 | foreach (string value; values) 81 | { 82 | bool isRegex; 83 | if (value.length > 6 && value[0 .. 7] == "(regex)") 84 | { 85 | isRegex =true; 86 | } 87 | foreach (Attribute attrib; node.getAttributes()) 88 | { 89 | foreach (string nodeValue; attrib.values) 90 | { 91 | if(isRegex) 92 | { 93 | auto capture = matchFirst(nodeValue, regex(value[7..$])); 94 | if (!capture.empty) { hitCount++; } 95 | } 96 | else { 97 | if (nodeValue == value) { hitCount++; } 98 | } 99 | if(hitCount == values.length) { return true; } 100 | } 101 | } 102 | } 103 | return false; 104 | } 105 | 106 | /** 107 | * Checks if the given node matches key and values of this attribute. 108 | * Note that all atribute values from this attribute must match the given nodes attribute values - not the other way round 109 | */ 110 | bool matches(Node node) 111 | { 112 | return this.matchesKey(node) && this.matchesValue(node); 113 | } 114 | 115 | } 116 | -------------------------------------------------------------------------------- /source/libdominator/package.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright: 3 | * (C) 2016 Martin Brzenska 4 | * 5 | * License: 6 | * Distributed under the terms of the MIT license. 7 | * Consult the provided LICENSE.md file for details 8 | */ 9 | module libdominator; 10 | 11 | public import libdominator.Attribute; 12 | public import libdominator.Dominator; 13 | public import libdominator.Node; 14 | public import libdominator.Filter; -------------------------------------------------------------------------------- /tests/dummy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | a-1 Inner 5 | 6 |

    a-2 Inner p before img

    7 | 8 |

    a-2 Inner p after img

    9 |
    10 | 11 |
    12 |
    13 |
      14 |
    1. li-1-ol-1 Inner
    2. 15 |
    3. li-2-ol-1 Inner
    4. 16 |
    5. li-3-ol-1 Inner
    6. 17 |
    18 |
    19 |
      20 |
    1. li-1-ol-2 Innera-1-li-1-o2-1 Inner
    2. 21 |
    3. li-2-ol-2 Innera-2-li-2-o2-1 Inner
    4. 22 |
    5. li-3-ol-2 Innera-3-li-3-o2-1 Inner
    6. 23 |
    24 |
    25 |
    26 |
    27 |
    28 |
    29 |

    test paragraph

    30 |
    31 |
    32 |
    33 |
    34 | 35 | 36 | 37 | 40 | 41 |
    active article
    42 | < article>active article< /article > 43 |
    active article< /article> 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
    65 |

    say what

    66 |
    67 | 68 | 69 | 70 | 71 | 72 | 73 | report 74 | 75 | 76 |
    Aha!
    77 | 78 |
    81 | Some Inner Text 82 |
    83 | 84 |
    90 | This node has a some evil attribute-values 91 |
    92 | 93 | 94 | /timeSCPD.xml 95 | 96 | --------------------------------------------------------------------------------