From: Marcio B. <mfb...@gm...> - 2007-05-26 19:18:19
|
Hello I have some questions. > Considering 4 xml documents (stored in an eXists database) below How can I create index for an element title and for attribute category ? Is there something like a create index statement in eXists ? How can I write a Xpath query where I can retrieve all documents where title has the word Italian or just part of word as Italia. Is there something similar to like operator in SQL ? Thanks, Marcio > > book001.xml > <?xml version="1.0" encoding="ISO-8859-1"?> > <book category="COOKING"> > <title lang="en">Everyday Italian</title> > <author>Giada De Laurentiis</author> > <year>2005</year> > <price>30.00</price> > </book> > > book002.xml > <?xml version="1.0" encoding="ISO-8859-1"?> > <book category="CHILDREN"> > <title lang="en">Harry Potter</title> > <author>J K. Rowling</author> > <year>2005</year> > <price>29.99</price> > </book> > > book003.xml > <?xml version="1.0" encoding="ISO-8859-1"?> > <book category="WEB"> > <title lang="en">XQuery Kick Start</title> > <author>James McGovern</author> > <year>2003</year> > <price>49.99</price> > </book> > > book004.xml > <?xml version="1.0" encoding="ISO-8859-1"?> > <book category="WEB"> > <title lang="en">Learning XML</title> > <author>Erik T. Ray</author> > <year>2003</year> > <price> 39.95</price> > </book> |