473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Searching random XML documents

I'm working with java and XML documents in order to search for keywords in a
given element name, eg element name 'author' == "jo blogs".

The problem is the XML documents are downloaded (this process is automated)
from different websites thus the element names for author may differ!

Is their a way of dealing with this, such as perhaps a standard adopted by,
say educational websites to agree on element names ?

Thanks very much

ps im also looking for a good simple search method, by element name and also
just searching an xml document as a regular text document
Jul 20 '05 #1
3 1924
Options
1) If you have limited number of schema (for difffering xml documents) then
you could possibly transform these documents
into your own common format and then write an xquery / xpath expression
to search for keywords in a given element
name.
2) Second option is to store all the keywords that you encounter in a
master file and then launch a process that does your
search (multi-thread for efficiency)
3) Use a comman standard in a direct format (that would mean all the
websites generate the info in a common format).
I would not be able to help without more information over here

"sal achhala" <no**@none.com> wrote in message
news:c1**********@newsg2.svr.pol.co.uk...
I'm working with java and XML documents in order to search for keywords in a given element name, eg element name 'author' == "jo blogs".

The problem is the XML documents are downloaded (this process is automated) from different websites thus the element names for author may differ!

Is their a way of dealing with this, such as perhaps a standard adopted by, say educational websites to agree on element names ?

Thanks very much

ps im also looking for a good simple search method, by element name and also just searching an xml document as a regular text document

Jul 20 '05 #2
> 1) If you have limited number of schema (for difffering xml documents)
then
you could possibly transform these documents into your own common format and then write an xquery / xpath expression to search for keywords in a
given element name.

thanks Martin, the option above makes sense to me (im new to java/XML) - i
could transform the diffrent formats into a common one. How easy would that
be ?

The common format of my XML documents would be Date, Title, Author and
articleBody.

how would one go about transforming the documents ?

Considering element names would differ from site to site how would an
automated process recognise, for instance, that 'name' is the same as
'author' ?

thanks very much

sal
"Martin SChukrazy" <pr****@hotmail.com> wrote in message
news:40**********************@news.rcn.com... Options
1) If you have limited number of schema (for difffering xml documents) then you could possibly transform these documents
into your own common format and then write an xquery / xpath expression to search for keywords in a given element
name.
2) Second option is to store all the keywords that you encounter in a
master file and then launch a process that does your
search (multi-thread for efficiency)
3) Use a comman standard in a direct format (that would mean all the
websites generate the info in a common format).
I would not be able to help without more information over here

"sal achhala" <no**@none.com> wrote in message
news:c1**********@newsg2.svr.pol.co.uk...
I'm working with java and XML documents in order to search for keywords
in a
given element name, eg element name 'author' == "jo blogs".

The problem is the XML documents are downloaded (this process is

automated)
from different websites thus the element names for author may differ!

Is their a way of dealing with this, such as perhaps a standard adopted

by,
say educational websites to agree on element names ?

Thanks very much

ps im also looking for a good simple search method, by element name and

also
just searching an xml document as a regular text document


Jul 20 '05 #3
There are several ways to go about this...
1) Use standard Data Transformation toolkits which transform from text / xml
to a given xml format. Usually visual GUI toolkits make the job easier..
2) Use XSLT transforms to transform from one xml format to a standard xml
format

Again you can usually try GUI tools such as Stylus Studio to do the XSLT
transform and then verify the results..
"sal achhala" <no**@none.com> wrote in message
news:c1**********@newsg4.svr.pol.co.uk...
1) If you have limited number of schema (for difffering xml documents) then
you could possibly transform these documents into your own common format and then write an xquery / xpath expression to search for keywords in a
given element name.

thanks Martin, the option above makes sense to me (im new to java/XML) - i
could transform the diffrent formats into a common one. How easy would that be ?

The common format of my XML documents would be Date, Title, Author and
articleBody.

how would one go about transforming the documents ?

Considering element names would differ from site to site how would an
automated process recognise, for instance, that 'name' is the same as
'author' ?

thanks very much

sal
"Martin SChukrazy" <pr****@hotmail.com> wrote in message
news:40**********************@news.rcn.com...
Options
1) If you have limited number of schema (for difffering xml documents) then
you could possibly transform these documents
into your own common format and then write an xquery / xpath

expression
to search for keywords in a given element
name.
2) Second option is to store all the keywords that you encounter in a
master file and then launch a process that does your
search (multi-thread for efficiency)
3) Use a comman standard in a direct format (that would mean all the
websites generate the info in a common format).
I would not be able to help without more information over here

"sal achhala" <no**@none.com> wrote in message
news:c1**********@newsg2.svr.pol.co.uk...
I'm working with java and XML documents in order to search for

keywords in
a
given element name, eg element name 'author' == "jo blogs".

The problem is the XML documents are downloaded (this process is

automated)
from different websites thus the element names for author may differ!

Is their a way of dealing with this, such as perhaps a standard

adopted by,
say educational websites to agree on element names ?

Thanks very much

ps im also looking for a good simple search method, by element name
and also
just searching an xml document as a regular text document



Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John C | last post by:
Hi, I am trying to include the generation of random numbers in my c++ class. However I don't quite know how to incorporate it. To start with, I managed to get random numbers going via the...
10
by: Marshall Belew | last post by:
I'm trying to synchronize a network app that uses random numbers generated by System.Random. Rather than pass every randomly generated number, I just pass the seed. I'm seeing a result that leads...
3
by: Julia | last post by:
Hi, We have an ASP.NET site,and a data base which contains different types of XML documents I would like to ask which technology is best to use for searching XML documents. My concern is that a...
33
by: Geoff Jones | last post by:
Hiya I have a DataTable containing thousands of records. Each record has a primary key field called "ID" and another field called "PRODUCT" I want to retrieve the rows that satisy the following...
5
by: justobservant | last post by:
When more than one keyword is typed into a search-query, most of the search-results displayed indicate specified keywords scattered throughout an entire website of content i.e., this is shown as...
39
by: Alan Isaac | last post by:
This may seem very strange, but it is true. If I delete a .pyc file, my program executes with a different state! In a single directory I have module1 and module2. module1 imports random and...
6
by: Lanny | last post by:
Well the othe day I was making a program to make a list of all the songs in certian directorys but I got a problem, only one of the directorys was added to the list. Heres my code: import random...
0
by: Edwin.Madari | last post by:
use songs.extend( asongs ) #append is for single item - where ever it mightbe. good luck. Edwin -----Original Message-----
5
by: lemlimlee | last post by:
hello, this is the task i need to do: For this task, you are to develop a Java program that allows a user to search or sort an array of numbers using an algorithm that the user chooses. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.