Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-23-2007, 01:53 AM   PM User | #1
Pesho
New Coder

 
Join Date: Jan 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Pesho is an unknown quantity at this point
problems with MySQL X-Path

Hello,

I have an X-Path problem here.
I have the following XML structure:
Code:
<OAI-PMH xsi:schemaLocation="blabla">
	<ListRecords>
	 <record>
	      <metadata>
	         <oai_dc:dc  xsi:schemaLocation="blabla">          
                      <dc:title>Just take her seriously</dc:title>
                      <dc:creator>Weijmar Schultz, W.C.M.</dc:creator>
                  </oai_dc:dc>
               </metadata>
            </record>

            <record>
	      <metadata>
	         <oai_dc:dc  xsi:schemaLocation="blabla">          
                      <dc:title>John's Book</dc:title>
                      <dc:creator>John</dc:creator>
                  </oai_dc:dc>
               </metadata>
            </record>
         </ListRecords>
</OAI-PMH>
Having the name of the creator, I'd like to extract the title of the corresponding record. E.g. I want to know the title of the record, whose creator is John.

I'm running MySQL 5.1. The xml structure is stored in a column "xml_content" in a table "xml" and I use the following X-Path expression:
Code:
ExtractValue(xml_content, '/OAI-PMH/ListRecords/record/metadata/oai_dc:dc//*[dc:creator="John"]/dc:title/) from xml;
Unfortunately, it doesn't work. Would you tell me whether my X-Path expression is wrong or my mistake is in the use of ExtractValue().

Thanks in advance,
Pesho
Pesho is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:07 AM.


Advertisement
Log in to turn off these ads.