```rust use wild_doc::*;
let dir="./wd-test/"; if std::path::Path::new(dir).exists(){ std::fs::removedirall(dir).unwrap(); } std::fs::createdirall(dir).unwrap();
let mut wd=WildDoc::new( dir ,IncludeLocal::new("./include/") ).unwrap();
//update data.
/wd.exec(r#"
let updatexml=r#"
//select data.
let r=wd.exec(r#"
//seaech data
let r=wd.exec(r#"
//use javascript
let r=wd.exec(r#"
wd.result_options['test']="OK";
</wd:script>
<wd:search name="p" collection="person">
<field name="country" method="match" wd:value="uk" />
</wd:search>
<wd:result var="q" search="p">
<div>
<wd:print wd:value="ymd()" />
</div>
<div>
find <wd:print wd:value="wd.v('q').length" /> persons from the <wd:print wd:value="uk" />.
</div>
<ul>
<wd:for var="r" index="i" wd:in="wd.v('q')"><li>
<wd:print wd:value="wd.v('r').row" /> : <wd:print wd:value="wd.v('r').field('name')" /> : <wd:print wd:value="wd.v('r').field('country')" />
</li></wd:for>
</ul>
</wd:result>
"#,"").unwrap(); println!("{} : {}",std::str::fromutf8(r.body()).unwrap(),r.optionsjson());
//search in update section.
wd.exec(r#"
xml
<html>
<head>
<title>HTML include test</title>
</head>
<body>
<wd:include wd:src="wd.v('body_path')" />
</body>
</html>
xml
BODY
rust
let r=wd.exec(r#"<wd><wd:stack var="body_path:'body.xml'">
<wd:include src="layout.xml" />
<wd:stack></wd>"#);
println!("{}",r);
html
<html>
<head>
<title>HTML include test</title>
</head>
<body>
BODY
</body>
</html>