Difference between storing a txt or a xml file

View: New views
10 Messages — Rating Filter:   Alert me  

Difference between storing a txt or a xml file

by karanjit cheema :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi
i made a text file out of the data from an xml file, though keeping the tags and everything exactly similar.
now i am trying to query these text files after storing them in the database.
is there any difference in the indexing of a text and an xml file, which might lead to varying querying times.

Regards,
Karanjit Cheema

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Difference between storing a txt or a xml file

by Adam Retter-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes,

An XML file is stored as XML and is indexed and accessible as XML. A
text file is stored as a binary blob and is not accessible as XML.

Why would you store XML as a text file?!?

2009/11/9 karanjit cheema <karanjitcheema@...>:

> hi
> i made a text file out of the data from an xml file, though keeping the tags
> and everything exactly similar.
> now i am trying to query these text files after storing them in the
> database.
> is there any difference in the indexing of a text and an xml file, which
> might lead to varying querying times.
>
> Regards,
> Karanjit Cheema
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Exist-open mailing list
> Exist-open@...
> https://lists.sourceforge.net/lists/listinfo/exist-open
>
>



--
Adam Retter

eXist Developer
{ United Kingdom }
adam@...
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Difference between storing a txt or a xml file

by karanjit cheema :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

because i am unable to remove a namespace xmlns =" ---"
having this namespace doesnt allow me to query the xml file.
removing the namespace results in the correct answers for the query.

Can you suggest a better method.

Regards,
Karanjit Cheema



On Mon, Nov 9, 2009 at 3:03 PM, Adam Retter <adam@...> wrote:

> Yes,
>
> An XML file is stored as XML and is indexed and accessible as XML. A
> text file is stored as a binary blob and is not accessible as XML.
>
> Why would you store XML as a text file?!?
>
> 2009/11/9 karanjit cheema <karanjitcheema@...>:
>> hi
>> i made a text file out of the data from an xml file, though keeping the tags
>> and everything exactly similar.
>> now i am trying to query these text files after storing them in the
>> database.
>> is there any difference in the indexing of a text and an xml file, which
>> might lead to varying querying times.
>>
>> Regards,
>> Karanjit Cheema
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>> trial. Simplify your report design, integration and deployment - and focus
>> on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Exist-open mailing list
>> Exist-open@...
>> https://lists.sourceforge.net/lists/listinfo/exist-open
>>
>>
>
>
>
> --
> Adam Retter
>
> eXist Developer
> { United Kingdom }
> adam@...
> irc://irc.freenode.net/existdb
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Difference between storing a txt or a xml file

by Adam Retter-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Why do you need to remove the namespace? Why not just query within
that namespace?

2009/11/9 karanjit cheema <karanjitcheema@...>:

> because i am unable to remove a namespace xmlns =" ---"
> having this namespace doesnt allow me to query the xml file.
> removing the namespace results in the correct answers for the query.
>
> Can you suggest a better method.
>
> Regards,
> Karanjit Cheema
>
>
>
> On Mon, Nov 9, 2009 at 3:03 PM, Adam Retter <adam@...> wrote:
>> Yes,
>>
>> An XML file is stored as XML and is indexed and accessible as XML. A
>> text file is stored as a binary blob and is not accessible as XML.
>>
>> Why would you store XML as a text file?!?
>>
>> 2009/11/9 karanjit cheema <karanjitcheema@...>:
>>> hi
>>> i made a text file out of the data from an xml file, though keeping the tags
>>> and everything exactly similar.
>>> now i am trying to query these text files after storing them in the
>>> database.
>>> is there any difference in the indexing of a text and an xml file, which
>>> might lead to varying querying times.
>>>
>>> Regards,
>>> Karanjit Cheema
>>>
>>> ------------------------------------------------------------------------------
>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>>> trial. Simplify your report design, integration and deployment - and focus
>>> on
>>> what you do best, core application coding. Discover what's new with
>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>> _______________________________________________
>>> Exist-open mailing list
>>> Exist-open@...
>>> https://lists.sourceforge.net/lists/listinfo/exist-open
>>>
>>>
>>
>>
>>
>> --
>> Adam Retter
>>
>> eXist Developer
>> { United Kingdom }
>> adam@...
>> irc://irc.freenode.net/existdb
>>
>



--
Adam Retter

eXist Developer
{ United Kingdom }
adam@...
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Difference between storing a txt or a xml file

by karanjit cheema :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As i told you having this namespace doesnt allow me to query the xml file.
Removing the namespace results in the correct answers for the query.

Regards
Karanjit Cheema

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Difference between storing a txt or a xml file

by Andrew Hart CEMS Staff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you use the "*" namespace in your query does it get to the data then?

karanjit cheema wrote:

> As i told you having this namespace doesnt allow me to query the xml file.
> Removing the namespace results in the correct answers for the query.
>
> Regards
> Karanjit Cheema
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Exist-open mailing list
> Exist-open@...
> https://lists.sourceforge.net/lists/listinfo/exist-open
>
>
> This incoming email to UWE has been independently scanned for viruses by McAfee anti-virus software and none were detected
>
>  



This email was independently scanned for viruses by McAfee anti-virus software and none were found
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Difference between storing a txt or a xml file

by karanjit cheema :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

i am new to xquery.
can you please give me a sample query using "*" namespace

Regards
Karanjit Cheema



On Mon, Nov 9, 2009 at 3:42 PM, Andrew Hart CEMS Staff
<Andrew2.Hart@...> wrote:
> If you use the "*" namespace in your query does it get to the data then?

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Difference between storing a txt or a xml file

by Adam Retter-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/9 karanjit cheema <karanjitcheema@...>:
> As i told you having this namespace doesnt allow me to query the xml file.

Sorry I forget the details, but that does not make sense. You can
query any XML, whether it is in a namespace or not.

You just need to declare the namespace prefix and use that i.e. -

declare namespace my="---";

let $xml :=
<a xmlns =" ---">
 <b>123</b>
</a> return

$xml/my:a/my:b


> Removing the namespace results in the correct answers for the query.
>
> Regards
> Karanjit Cheema
>



--
Adam Retter

eXist Developer
{ United Kingdom }
adam@...
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Difference between storing a txt or a xml file

by Andrew Hart CEMS Staff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

let $a := <one:data xmlns:one="http://random.com/one"
          xmlns:two="http://random.com/two">
    <one:datain>1</one:datain>
    <two:datain>2</two:datain>
</one:data>

return $a/*:datain


<one:datain xmlns:one="http://random.com/one">1</one:datain>
<two:datain xmlns:two="http://random.com/two">2</two:datain>



karanjit cheema wrote:

> i am new to xquery.
> can you please give me a sample query using "*" namespace
>
> Regards
> Karanjit Cheema
>
>
>
> On Mon, Nov 9, 2009 at 3:42 PM, Andrew Hart CEMS Staff
> <Andrew2.Hart@...> wrote:
>  
>> If you use the "*" namespace in your query does it get to the data then?
>>    
>
>
> This incoming email to UWE has been independently scanned for viruses by McAfee anti-virus software and none were detected
>  



This email was independently scanned for viruses by McAfee anti-virus software and none were found
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open

Re: Difference between storing a txt or a xml file

by Dannes Wessels-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Mon, Nov 9, 2009 at 11:14 AM, karanjit cheema <karanjitcheema@...> wrote:
i am new to xquery.
can you please give me a sample query using "*" namespace

The book XQuery by Priscilla Walmsley ( http://www.datypic.com/books/xquery/ ) a great book to learn about xquery and to have as reference manual.

regards

Dannes

--
eXist-db Native XML Database - http://exist-db.org
Join us on linked-in: http://www.linkedin.com/groups?gid=35624

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open