classafSizzle::SizzleDoc

sys::Obj
  afSizzle::SizzleDoc

Holds a document that may be queried with CSS selectors.

add

Source

Void add(SElem elem)

Adds another root element.

fromXml

Source

static new fromXml(Str xml)

Create a SizzleDoc from the given XML string.

get

Source

@Operator
SElem[] get(Str cssSelector, Bool checked := true)

An alias for select()

make

Source

new make(SElem root)

Create a SizzleDoc from the given root SElem.

remove

Source

Void remove(SElem elem)

Removed the the given SElem.

root

Source

SElem root { private set }

Returns the root element of the XML document.

select

Source

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 and checked is true.

selectFrom

Source

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 and checked is true.

update

Source

Void update(SElem elem, Bool recurse := false)

Updates / refreshes the given SElem - must have already been added.