Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
xpath queries against mutiple xml files
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
MD  
View profile  
 More options Jan 3 2005, 1:58 pm
Newsgroups: microsoft.public.xml
From: "MD" <mdre...@quilogy.com>
Date: 3 Jan 2005 10:58:42 -0800
Local: Mon, Jan 3 2005 1:58 pm
Subject: xpath queries against mutiple xml files
Hi:

I need a little help here. I am new to xml and I need to perform a
query against 2 xml files. For example:

<Customer>
<Products>
<Product name = Banana/>
<Product name = Orange/>
<Product name = Beans/>
</Products>
</Customer>

In another xml file

<Capability>
<Gas>
<Product name = Beans/>
</Gas>
<EyeSight>
<Product name = Carrots/>
</EyeSight>
<Capability>

The query I want to wite:
Show me all capabilities for a customer based on what the customer
products are. In this example, the customer would have the capability
of Gas because the customer has Beans as the product but not carrots.

I can easily write this in a SQL query, but xpath seems a little more
rudimentary. But then again, I am a newbie so I say that with
absolutley no authority whatsoever.

Does this make sense?

Thanks

MD


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Sharp  
View profile  
 More options Jan 4 2005, 2:47 am
Newsgroups: microsoft.public.xml
From: "Mike Sharp" <rdc...@hotmail.com>
Date: Mon, 3 Jan 2005 23:47:30 -0800
Local: Tues, Jan 4 2005 2:47 am
Subject: Re: xpath queries against mutiple xml files
Are you trying to do this in an XSLT?  You can use the document() function
to return nodes in a 2nd XML document that match criteria in the 1st XML
document.  like:

<xsl:variable name="vProducts" select="/Customer/Products/Product"/>
<xsl:for-each select="document('foo.xml')/Capability/*[Product/@name =
$vProducts/Product/@name]">

Or something to that effect.

If you're trying to do this in an XPathNavigator, or using SelectNodes() or
some such, you'll have to combine the XML documents, as methods such as
selectSingleNode work from a single node.

Regards,
Mike Sharp

I

"MD" <mdre...@quilogy.com> wrote in message

news:1104778722.551650.295020@c13g2000cwb.googlegroups.com...


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google