summaryrefslogtreecommitdiffstats
path: root/Report
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2008-05-26 21:13:55 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2008-05-26 21:13:55 (GMT)
commit23edaea357459837fa67737880c490b8597006f6 (patch)
treeb7bdd00ea3bdf1e67b2cfaabcbf6b4a15dafb478 /Report
parenta3f3e169f6df66743e2a15ee3338a78126804333 (diff)
download2id45-23edaea357459837fa67737880c490b8597006f6.zip
2id45-23edaea357459837fa67737880c490b8597006f6.tar.gz
2id45-23edaea357459837fa67737880c490b8597006f6.tar.bz2
check
Diffstat (limited to 'Report')
-rw-r--r--Report/Chapter4.tex8
1 files changed, 4 insertions, 4 deletions
diff --git a/Report/Chapter4.tex b/Report/Chapter4.tex
index dcb2b02..8d49a7c 100644
--- a/Report/Chapter4.tex
+++ b/Report/Chapter4.tex
@@ -28,16 +28,16 @@ foreach ($nodes as $node)
The \textit{\$query} keyword denotes a variable which, in this case, is our query to retrieve the items from our database. The \textit{\$nodes = \$xpath$\rightarrow$query(\$query)} line actually performs the query and retrieves the nodes from the database. \\
-We then go through each item with the \textit{foreach} statement. Then, from that element, we get the title with the \textit{getElementsByTagName()} function. This gives us again a XML tree with nodes. We know that there is only one title, so we get the value of that node with \textit{\$item$\rightarrow$item(0)$\rightarrow$nodeValue}.
+We then go through each item with the \textit{foreach} statement. Then, from that element, we get the title with the \textit{getElementsByTagName()} function. This gives us again an XML tree with nodes. We know that there is only one title, so we get the value of that node with \textit{\$item$\rightarrow$item(0)$\rightarrow$nodeValue}.
\subsection{Search queries}
-The search the database for your favorite beer, you can fill in a small search-form. The PHP script will then return all items that apply yo the search query. Such a query is shown below.
+To search the database for your favorite beer, you can fill in a small search-form. The PHP script will then return all items that apply the search query. Such a query is shown below.
$$ \textit{//item[contains(title/text(), "bier") or contains(descr/text(), "bier")]} $$
$$ \textit{[LiquorTypeID/text()="2"][NewsCategoryID/text()="2"]} $$
-The query begins the same as that of the previous query. The main difference here are the extra filters applied to the query. It checks if either the title or description of the news-item contains a string with the XPath function $ contains $ which returns a boolean value. It also check the type of liquor and news category.
+The query begins the same as that of the previous query. The main difference here is that the extra filters applied to the query. It checks if either the title or description of the news-item contains a string with the XPath function $ contains $ which returns a boolean value. It also checks the type of liquor and news category.
\subsection{Update information}
@@ -48,4 +48,4 @@ $item = $node->getElementsByTagName("description");
$item->item(0)->nodeValue = "Changed your value... Joink!";
\end{verbatim}
-As you can see, the nodeValue can easily be changed. Once the right news-item is retrieved, it's values can be changed with an assignment statement. \\ \ No newline at end of file
+As you can see, the nodeValue can easily be changed. Once the right news-item is retrieved, its value can be changed with an assignment statement. \\