0

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...

5
Contributors
6
Replies
7
Views
9 Years
Discussion Span
Last Post by m.asfak
0

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?

0

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>
0

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. :(

0

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..

0

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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.