Hello, I have a problem. I would like to search certain word from xml. For example:

I would like to search "black". And in XML file there is value "black board". But it does not appear.

Does anyone know how to solve it?

I mean when I type "black", the "black board" also appear...

Can you give an example of what you need to do? There are tons of ways to do what you want, but it depends on where in the XML you're searching and how you want to search. Do you want a full application that lets you do this, a search algorithm outline, a regular expression, or an XPath?

I use Xpath...

Here is my Xpath:

path="form/description[contains(<%= request.Form("search_by")%>='<%= request.Form("txtSearch")%>')]//*";

I try to use "contains" but it does not work

Here is my XML(description2.xml):

<form>
	<description>
		<desc_id>048/26/SMD/HRD/9/00</desc_id>
		<title>Kebijakan2</title>
		<dates>3/21/1999</dates>
		<author>Smart Co</author>
		<file_name>Policy2</file_name>
		<type>pdf</type>
		<category>memorandum</category>
		<status>tidak_berlaku</status>
		<year>1983</year>
	</description>
</form>

That looks a little beyond Edward's abilities. Ed would search using a regular expression, but I don't think that's what you're looking for. Sorry. :(

Edward could you show me the way using regular expression.. i am facing problem as above that i want search "black" but it don't return word with black like black-board..

there are not any processing-instruction in the xml example

<form>
    <description>
    <desc_id>048/26/SMD/HRD/9/00</desc_id>
    <title>Kebijakan2</title>
    <dates>3/21/1999</dates>
    <author>Smart Co</author>
    <file_name>Policy2</file_name>
    <type>pdf</type>
    <category>memorandum</category>
    <status>tidak_berlaku</status>
    <year>1983</year>
    </description>
    </form>

shows more of the xml

This article has been dead for over six months. Start a new discussion instead.