|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| ESQL and XPATH | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | ovasquez | 
			  
				|  Posted: Mon Sep 15, 2008 3:14 pm    Post subject: ESQL and XPATH |   |  |  
		  |  Centurion
 
 
 Joined: 09 Dec 2005Posts: 141
 Location: Lima, Peru
 
 | 
			  
				| Exist any function in ESQL same to XPath Search(//*[Element])?, for example i have this XML:
 
 
   
	| Code: |  
	| <?xml version="1.0"?>
 <Sales>
 <Customer name="CostCo, Inc.">
 <ord:Order xmlns:ord="http://www.davber.com/order-format" price="2000">
 <ord:Description>A tiny web site</ord:Description>
 </ord:Order>
 <ord:Order xmlns:ord="http://www.davber.com/order-format" price="12000">
 <Local>
 <ord:Description>Database configuration</ord:Description>
 </Local>
 </ord:Order>
 </Customer>
 
 <Customer name="BigBuyer, Inc.">
 <ord:Order xmlns:ord="http://www.davber.com/order-format" price="30000">
 <Global>
 <ord:Description>A J2EE system for lawyers</ord:Description>
 </Global>
 </ord:Order>
 </Customer>
 </Sales>
 
 |  
 I nead find all elements ord:Description, so i use this XPATH Expression:
 (//*[ns1:Description]), because is very diferent position from "Description" Element
 
 Please your help.
 _________________
 Oscar Vásquez Flores
 |  |  
		  | Back to top |  |  
		  |  |  
		  | sridhsri | 
			  
				|  Posted: Tue Sep 16, 2008 6:10 am    Post subject: |   |  |  
		  | Master
 
 
 Joined: 19 Jun 2008Posts: 297
 
 
 | 
			  
				| You can use select statements on the message tree. Here is an excerpt from the help: 
 
 
   
	| Quote: |  
	| SELECT is performed on the message tree produced by the first example (rather than on a real database table). The result is assigned into a subfolder of OutputRoot:
 
 SET OutputRoot.XMLNS.Data.TableData.Part[] = SELECT
 P.PartNumber,
 P.Description,
 P.Price
 FROM PartsTable.Part[] AS P;
 
 |  |  |  
		  | Back to top |  |  
		  |  |  
		  | ovasquez | 
			  
				|  Posted: Wed Sep 17, 2008 9:03 am    Post subject: |   |  |  
		  |  Centurion
 
 
 Joined: 09 Dec 2005Posts: 141
 Location: Lima, Peru
 
 | 
			  
				| But is not solutions because i don't know where is my element, 
 
 
   
	| sridhsri wrote: |  
	| You can use select statements on the message tree. Here is an excerpt from the help: 
 
 
   
	| Quote: |  
	| SELECT is performed on the message tree produced by the first example (rather than on a real database table). The result is assigned into a subfolder of OutputRoot:
 
 SET OutputRoot.XMLNS.Data.TableData.Part[] = SELECT
 P.PartNumber,
 P.Description,
 P.Price
 FROM PartsTable.Part[] AS P;
 
 |  |  _________________
 Oscar Vásquez Flores
 |  |  
		  | Back to top |  |  
		  |  |  
		  | mqjeff | 
			  
				|  Posted: Wed Sep 17, 2008 9:06 am    Post subject: |   |  |  
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| You can use FIELDNAME in WHERE clauses. 
 
  |  |  
		  | Back to top |  |  
		  |  |  
		  |  |  |  
  
	|    |  | Page 1 of 1 |  
 
 
  
  	| 
		
		  | 
 
 | You cannot post new topics in this forum You cannot reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 
 |  |  |  |