Searching random XML documents

Discussion in 'XML' started by sal achhala, Feb 25, 2004.

  1. sal achhala

    sal achhala Guest

    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
     
    sal achhala, Feb 25, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:c1ivac$jou$...
    > 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
    >
    >
     
    Martin SChukrazy, Feb 26, 2004
    #2
    1. Advertising

  3. sal achhala

    sal achhala Guest

    > 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" <> wrote in message
    news:403d6040$0$3075$...
    > 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" <> wrote in message
    > news:c1ivac$jou$...
    > > 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
    > >
    > >

    >
    >
     
    sal achhala, Feb 26, 2004
    #3
  4. 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" <> wrote in message
    news:c1ki3t$52l$...
    > > 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" <> wrote in message
    > news:403d6040$0$3075$...
    > > 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" <> wrote in message
    > > news:c1ivac$jou$...
    > > > 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
    > > >
    > > >

    > >
    > >

    >
    >
     
    Martin SChukrazy, Feb 27, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Darrel
    Replies:
    1
    Views:
    317
    Steve C. Orr [MVP, MCSD]
    Feb 18, 2005
  2. Elmar Baumann
    Replies:
    0
    Views:
    619
    Elmar Baumann
    Feb 2, 2004
  3. Replies:
    1
    Views:
    490
    Juan T. Llibre
    Oct 18, 2006
  4. globalrev
    Replies:
    4
    Views:
    778
    Gabriel Genellina
    Apr 20, 2008
  5. VK
    Replies:
    15
    Views:
    1,190
    Dr J R Stockton
    May 2, 2010
Loading...

Share This Page