classafSizzle::SizzleDoc
sys::Obj afSizzle::SizzleDoc
Holds a document that may be queried with CSS selectors.
- add
Adds another root element.
- fromXml
static new fromXml(Str xml)
Create a
SizzleDoc
from the given XML string.- get
@
Operator
SElem[] get(Str cssSelector, Bool checked := true)An alias for
select()
- make
new make(SElem root)
Create a
SizzleDoc
from the given root SElem.- remove
Removed the the given SElem.
- root
SElem root { private set }
Returns the root element of the XML document.
- select
SElem[] select(Str cssSelector, Bool checked := true)
Queries the document with the given CSS selector any returns any matching elements.
Throws
ParseErr
if the CSS selector is invalid andchecked
istrue
.- selectFrom
SElem[] selectFrom(SElem parent, Str cssSelector, Bool checked := true)
Queries the document for elements under the given parent, returning any matches.
Throws
ParseErr
if the CSS selector is invalid andchecked
istrue
.- update
Void update(SElem elem, Bool recurse := false)
Updates / refreshes the given SElem - must have already been added.