473,396 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

xpath help

Hi every one,

I need help to get the this going, Itried whatever I can but could not get the right xpath to this xml


I need to get the value of this node (IMAGE_FILE)

and this is not working

/row/ARTICLE/RELATE/IMAGE_FILE/IMAGE_PATH

please let me know what I am missing


Expand|Select|Wrap|Line Numbers
  1. <row>
  2.   <View_ArticlesByLineupID>
  3.     <LINEUP_ID>64</LINEUP_ID>
  4.     <ARTICLE_ID>22</ARTICLE_ID>
  5.     <TITLE>مرد میانسال وارد فروشگاه اتومبیل شد. ب*ام*و آخرین مدلی را دیده و پسندیده بود. وجه را</TITLE>
  6.     <ABSTRACT />
  7.     <BODY>مرد میانسال وارد فروشگاه اتومبیل شد. ب*ام*و آخرین مدلی را دیده و پسندیده بود. وجه را پرداخت و سوار بر اتومبیل تندروی خود شد و از فروشگاه بیرون آمد. قدری راند و از شتاب اتومبیل لذّت برد. وارد بزرگراه شد و قدری بر سرعت اتومبیل افزود. کروکی اتومبیل را پایین داد تا باد به صورتش بخورد و لذّت بیشتری ببرد. چند شاخ مو بر بالای سرش در تب و تاب بود و با حرکت باد به این سوی و آن سوی می*رفت. پای را بر پدال گاز فشرد و اتومبیل گویی پرنده*ای بود رها شده از قفس. سرعت به 160 کیلومتر در ساعت رسید. 
  8. مرد به اوج هیجان رسیده بود. نگاهی به آینه انداخت. دید اتومبیل پلیس به سرعت در پی او می*آید و چراغ گردانش را روشن کرده و صدای آژیرش را نیز به اوج فلک رسانده است. مرد اندکی مردّد ماند که از سرعت بکاهد یا فرار را بر قرار ترجیح دهد. لَختی اندیشید. سپس برای آن که قدرت و سرعت اتومبیلش را بیازماید یا به رخ پلیس بکشد بر سرعتش افزود. به 180 رسید و سپس 200 را پشت سر گذاشت، از 220 گذشت و به 240 رسید. اتومبیل پلیس از نظر پنهان شد و او دانست که پلیس را مغلوب کرده است. 
  9. ناگهان به خود آمد و گفت، "مرا چه می*شود که در این سنّ و سال با این سرعت می‎رانم؟ باشد که بایستم تا او بیاید و بدانم چه می*خواهد." از سرعتش کاست و سپس در کنار جادّه منتظر ایستاد تا پلیس برسد. اتومبیل پلیس آمد و پشت سرش توقّف کرد. افسر پلیس به سوی او آمد، نگاهی به ساعتش انداخت و گفت، "ده دقیقه دیگر وقت خدمتم تمام است. امروز جمعه است و قصد دارم برای تعطیلات چند روزی به مرخّصی بروم. سرعتت آنقدر بود که تا به حال نه دیده بودم و نه شنیده بودم. اگر دلیلی قانع*کننده داشته باشی که چرا به این سرعت می*راندی، می*گذارم بروی." 
  10. مرد میانسال نگاهی به افسر کرد و گفت، "می*دونی، جناب سروان؛ سالها قبل زن من با یک افسر پلیس فرار کرد. تصوّر کردم داری اونو برمی*گردونی!" 
  11. افسر خندید و گفت، "روز خوبی داشته باشید، آقا!" و برگشته سوار اتومبیلش شد و رفت. 
  12. _________________</BODY>
  13.     <FOOTER />
  14.     <PUBLISHDATE>2008-10-20T00:00:00</PUBLISHDATE>
  15.     <STATUS>1         </STATUS>
  16.     <Expr1>22</Expr1>
  17.   </View_ArticlesByLineupID>
  18.   <View_ArticlesByLineupID>
  19.     <LINEUP_ID>64</LINEUP_ID>
  20.     <ARTICLE_ID>16</ARTICLE_ID>
  21.     <TITLE>China opens Olympic Games with eye-catching ceremony</TITLE>
  22.     <ABSTRACT>Opening Ceremony a four-hour event filled with colour, culture and more</ABSTRACT>
  23.     <BODY>BEIJING–Now, that was a show. A breathtaking display of colourful culture that only China could manage.
  24.  
  25. They do things big in this country, and todays Opening Ceremony for the Summer Olympic Games was no exception. In a ceremony that has to have Vancouver 2010 chief John Furlong feeling at least a little apprehensive, artistic director Zhang Yimou pulled out all the stops. And then some.
  26.  
  27. There was a giant globe that turned into a TV screen on which people ran upside down, floating fairies in the sky, a display of ethnic culture and impossibly elaborate costumes, the hammering sound of 2,008 percussive instruments called "fou" – all pounding in unison and more, including a parade of firework "footprints" in the sky that led from Tiananmen Square to the National Stadium – also called the Birds Nest – in north Beijing.
  28.  
  29. Things began with the arrival of Chinas president, Hu Jintao, along with International Olympic Committee president Jacques Rogge. The playing of the fou rumbled like thunder in the packed stadium as the countdown began with lighted numbers displayed on the floor of the stadium. A second after it hit "one," a huge burst of dazzling fireworks lit up the sky in shades of red, yellow and green. Outside, fireworks were lit to make the National Stadium look like a blossoming flower.
  30.  
  31. To close the ceremony, gymnastic gold medallist Li Ning was suspended high above the stadium and appeared to be running sideways along the vertical rim of the towering facility. With the Olympic torch in hand, he rose up and lit a long pipe that shot a flame into the spiralling, red cauldron that rises high above the rim of the stadium. A huge fireworks show followed all over Beijing, putting the finishing touches on a stupendous evening when China said hello to the world.
  32.  
  33. Part of the roof structure of the National Stadium was used a movie screen. Images of waves, whales and smiling children lit up the structure at various parts of the show.
  34.  
  35. Organizers said the 56 children who carried the Chinese flag into the stadium were from 56 different ethnic cultures, and it looked like all of them were on display during the ceremony. There were whirling martial artists dressed all in white and acrobatic men in black who whirled on the ground with paint brushes in hand to demonstrate the art of Chinese writing.
  36.  
  37. China is the birthplace of gunpowder, the compass, moveable type and paper, and all were featured in the nearly four hour show.
  38.  
  39. It wasnt a playful show, but it was polished as can be and hugely powerful. If anyone didnt know about Chinas amazing cultural diversity and rich history before they watched the ceremony, they certainly knew it when things wrapped up late on a hot and steamy but rain-free night in Chinas capital.
  40.  
  41. There was a big cheer from the crowd for athletes from Chinese Taipei and also for Iraq. The Americans, dressed in white pants, blue blazers and white hats that looked like tam oshanters, got a decidedly mixed reaction.
  42.  
  43. And there was a Tibetan mountaineer helping carry the Olympic flag into a stadium packed with 90,000 people. But this night wasnt about politics, it was about a stunning culture and a beginning, at last, to the Summer Olympics that were awarded to China seven years ago in a vote that left Toronto an Olympic bridesmaid for the second time.
  44.  
  45. There were 14,000 performers in all, nine thousand of them from the Chinese army. It took 600 people just to light the fireworks.
  46.  
  47. Canada marched into the ceremony 63rd because of the way Canada is spelled in Chinese lettering. Oakville kayaker Adam van Koeverden waved the Maple Leaf in the air as he entered the stadium.
  48.  
  49. "It was the best experience of my life thus far," van Koeverden told the CBC.
  50.  
  51. But there was no national leader for the Canadians to wave to. U.S. President George W. Bush was in attendance, but Canadian Prime Minister Stephen Harper took a pass, stating he was busy with other matters. Harper sent Foreign Minister David Emerson in his place.
  52.  
  53. About two-thirds of Canadas 332 athletes marched into the National Stadium, as did the Toronto-area entertainer Mark Rowswell, known as Dashan in China and a nationally loved figure. 
  54.  
  55. "As we were coming through the tunnel we were singing O Canada a couple times," field hockey player Mike Mahood of Vancouver told the CBC.
  56.  
  57. Said shooter Avianna Chao, who was born in China but now lives in Toronto: "Its an extremely powerful experience ... Im just extremely proud to be Canadian today."
  58.  
  59. There were some pretty interesting costumes, ranging from guys in wild print shirts to an Italian team decked out in silver blazers – and matching shoes. 
  60.  
  61. Among those performing were British singer Sarah Brightman and young Chinese pianist Lang Lang, a flamboyant, Vegas-style showman the likes of which Chairman Mao never saw.
  62.  
  63. Natalie DuToit, the south African swimmer with just one leg, carried the flag for her nation, while towering NBA superstar Yao Ming walked in with his nations flag, accompanied by a young victim of this years earthquake in Sichuan. But the privilege of lighting the torch belonged to Li, a gold medallist in artistic gymnastics for China.
  64.  
  65. Other features in the show, designed by artistic director Zhang Yimou, included a giant, 800-kilogram painting scroll to celebrate the making of paper as one of the great inventions of China. There also were quotations from Confucius, depictions of the Great Wall, the Terracotta Soldiers, colourful kites, martial arts and the Silk Road. Not to mention a pipe band playing "Scotland the Brave" and other tunes.
  66.  
  67. If nothing else, you have to feel for Vancouver 2010 organizers, who somehow will have to come up with an Opening Ceremony that at least compares.
  68.  
  69. The cauldron was lit around midnight local time following a four-hour and seven minute ceremony, and there was a full three-minute display of fireworks by the country that invented them. The smoke certainly didnt help the visibility in a Chinese capital that has been socked in by low haze for days, but nobody seemed to mind.
  70.  
  71. It was undoubtedly the most lavish Opening Ceremony in the long history of the Olympics.
  72.  
  73. Millions of workers were told to take the day off to ease traffic. Hundreds of thousands of people, if not more, jammed the streets or took to Tiananmen Square to watch the proceedings on giant television screens.
  74.  
  75. As they say, let the games begin.
  76.  
  77. with files from Canadian Press and Associated Press
  78.  
  79.  
  80.  
  81.  
  82. thestar.com</BODY>
  83.     <FOOTER />
  84.     <PUBLISHDATE>2008-08-09T00:00:00</PUBLISHDATE>
  85.     <STATUS>1         </STATUS>
  86.     <Expr1>16</Expr1>
  87.   </View_ArticlesByLineupID>
  88.   <View_ArticlesByLineupID>
  89.     <LINEUP_ID>64</LINEUP_ID>
  90.     <ARTICLE_ID>26</ARTICLE_ID>
  91.     <TITLE>Custom developed solution</TITLE>
  92.     <ABSTRACT />
  93.     <BODY>CGI Design specializes in custom Currency Exchange and Money Transfer software development and delivers high quality solutions to these type of businesses. In our work we use modern technologies and individual approach to every company. 
  94. Your software will be.</BODY>
  95.     <FOOTER />
  96.     <PUBLISHDATE>2008-11-15T00:00:00</PUBLISHDATE>
  97.     <STATUS>1         </STATUS>
  98.     <Expr1>26</Expr1>
  99.   </View_ArticlesByLineupID>
  100.   <View_ArticlesByLineupID>
  101.     <LINEUP_ID>64</LINEUP_ID>
  102.     <ARTICLE_ID>17</ARTICLE_ID>
  103.     <TITLE>President and Chief Executive Officer</TITLE>
  104.     <ABSTRACT />
  105.     <BODY>Dr. Edwin Boswell is President and Chief Executive Officer of The Forum Corporation.  In addition to his duties as CEO, Ed advises senior executive teams involved in major organizational transformation initiatives.  His clients include DuPont, Department of Homeland Security, Merck, Ciba-Giegy, Mellon Financial, Campbell Soup, CIGNA, and Tyco Electronics.  
  106.  
  107.  
  108.  
  109. Prior to joining Forum, Ed led sales and service teams for IBM and served as an organizational consultant for Human Systems.
  110.  
  111.  
  112.  
  113. Ed earned a B.A. in Psychology from the University of Texas at Austin. Additionally, he earned an M.A. and a Ph.D. in Psychology, as well as The Wharton School Certificate in Business Administration, all from the University of Pennsylvania.  Eds accomplishments have been recognized by a Presidents Award from DuPont Mexico and a Forum Chairmans Award.
  114.  
  115.  
  116.  
  117. A recognized leader in the field of performance improvement, Ed is often quoted in the press on issues relating to leadership and organizational performance.
  118.  
  119.  
  120.  
  121. Phone: 1.800.FORUM.11</BODY>
  122.     <FOOTER />
  123.     <PUBLISHDATE>2008-10-15T00:00:00</PUBLISHDATE>
  124.     <STATUS>1         </STATUS>
  125.     <Expr1>17</Expr1>
  126.   </View_ArticlesByLineupID>
  127.   <View_ArticlesByLineupID>
  128.     <LINEUP_ID>64</LINEUP_ID>
  129.     <ARTICLE_ID>24</ARTICLE_ID>
  130.     <TITLE>Currency Exchange Software</TITLE>
  131.     <ABSTRACT />
  132.     <BODY>Office Exchange is a multi currency accounting software that was specifically designed for Foreign Currency Exchange Offices and financial companies that mainly Exchange Currencies, Cash Checks, Give loans and Transfer Money to any location in the world. It is an excellent tool for Managerial Decision Making in a Currency Exchange Office. Office Exchange is the result of years of research and interviews with foreign exchange offices in Canada and other countries. It is very easy to use, reliable and can be customized to meet your business requirement</BODY>
  133.     <FOOTER />
  134.     <PUBLISHDATE>2008-11-15T00:00:00</PUBLISHDATE>
  135.     <STATUS>1         </STATUS>
  136.     <Expr1>24</Expr1>
  137.   </View_ArticlesByLineupID>
  138.   <View_ArticlesByLineupID>
  139.     <LINEUP_ID>64</LINEUP_ID>
  140.     <ARTICLE_ID>21</ARTICLE_ID>
  141.     <TITLE>داريم البته بلانسبت حماررررر  پا به پاتون داريم زحمت ميكشيم</TITLE>
  142.     <ABSTRACT />
  143.     <BODY>با اين اوضاع اقتصادي كه ما ها هم داريم البته بلانسبت حماررررر  پا به پاتون داريم زحمت ميكشيم  
  144. بماند كه هنوز كار خونه و نگهداري بچه ها با خودمونه! 
  145. قبول دارم كه كمك ها دو طرفه شده اما فكرشو بكن ما قبول كرديم مسپوليت هزينه ها رو نصف نصف قبول كنيم حتي اگر مجبور باشيم به بدنمون فشار بيشتري بياريم اما احترام و ارزشمون هنوز در سطح جنس مخالفمون نيست 
  146. خيلي مسخره است كه هنوز مردايي هستن كه چون خانومي كسرشون ميشه چيزي رو كه بلد نيستن از تو بپرسن  
  147. ولي عزيز جان ناراحت نباش ما همه اينا لاي نون داغ نگه ميداريم و به جاش درست و حسابي ميگذاريم تو كاسه شون    
  148. راستي همشهري! دو ساعت كه هيچ 2 ديقشم نمتني تاب بيري!!!!</BODY>
  149.     <FOOTER />
  150.     <PUBLISHDATE>2008-10-20T00:00:00</PUBLISHDATE>
  151.     <STATUS>1         </STATUS>
  152.     <Expr1>21</Expr1>
  153.   </View_ArticlesByLineupID>
  154.   <ARTICLE>
  155.     <ARTICLE_ID>26</ARTICLE_ID>
  156.     <Expr1>26</Expr1>
  157.     <RELATE>
  158.       <UIDRELATE>5</UIDRELATE>
  159.       <IMAGE_FILE>
  160.         <IMAGE_FILE>la_pics 004.jpg</IMAGE_FILE>
  161.         <IMAGE_PATH>E:\website_q\cgi_cms\cms_images\</IMAGE_PATH>
  162.         <IMAGE_SIZE>1</IMAGE_SIZE>
  163.         <IMAGE_CAT>1</IMAGE_CAT>
  164.         <PUBLISHDATE>2008-07-25T00:00:00</PUBLISHDATE>
  165.         <STATUSE>1         </STATUSE>
  166.         <LINEUPASSET>
  167.           <ASSET_ID>26</ASSET_ID>
  168.           <LINEUP_ID>64</LINEUP_ID>
  169.         </LINEUPASSET>
  170.       </IMAGE_FILE>
  171.     </RELATE>
  172.     <RELATE>
  173.       <UIDRELATE>6</UIDRELATE>
  174.       <IMAGE_FILE>
  175.         <IMAGE_FILE>la_pics 005.jpg</IMAGE_FILE>
  176.         <IMAGE_PATH>E:\website_q\cgi_cms\cms_images\</IMAGE_PATH>
  177.         <IMAGE_SIZE>1</IMAGE_SIZE>
  178.         <IMAGE_CAT>1</IMAGE_CAT>
  179.         <PUBLISHDATE>2008-07-25T00:00:00</PUBLISHDATE>
  180.         <STATUSE>1         </STATUSE>
  181.         <LINEUPASSET>
  182.           <ASSET_ID>26</ASSET_ID>
  183.           <LINEUP_ID>64</LINEUP_ID>
  184.         </LINEUPASSET>
  185.       </IMAGE_FILE>
  186.     </RELATE>
  187.     <RELATE>
  188.       <UIDRELATE>9</UIDRELATE>
  189.       <IMAGE_FILE>
  190.         <IMAGE_FILE>la_pics 001.jpg</IMAGE_FILE>
  191.         <IMAGE_PATH>E:\website_q\cgi_cms\cms_images\</IMAGE_PATH>
  192.         <IMAGE_SIZE>1</IMAGE_SIZE>
  193.         <IMAGE_CAT>1</IMAGE_CAT>
  194.         <PUBLISHDATE>2008-07-25T00:00:00</PUBLISHDATE>
  195.         <STATUSE>1         </STATUSE>
  196.         <LINEUPASSET>
  197.           <ASSET_ID>26</ASSET_ID>
  198.           <LINEUP_ID>64</LINEUP_ID>
  199.         </LINEUPASSET>
  200.       </IMAGE_FILE>
  201.     </RELATE>
  202.   </ARTICLE>
  203.   <ARTICLE>
  204.     <ARTICLE_ID>22</ARTICLE_ID>
  205.     <Expr1>22</Expr1>
  206.     <RELATE>
  207.       <UIDRELATE>17</UIDRELATE>
  208.       <IMAGE_FILE>
  209.         <IMAGE_FILE>17_la_pics 072.jpg</IMAGE_FILE>
  210.         <IMAGE_PATH>E:\website_q\cgi_cms\cms_images\</IMAGE_PATH>
  211.         <IMAGE_SIZE>1</IMAGE_SIZE>
  212.         <IMAGE_CAT>1</IMAGE_CAT>
  213.         <PUBLISHDATE>2008-07-26T00:00:00</PUBLISHDATE>
  214.         <STATUSE>1         </STATUSE>
  215.         <LINEUPASSET>
  216.           <ASSET_ID>22</ASSET_ID>
  217.           <LINEUP_ID>64</LINEUP_ID>
  218.         </LINEUPASSET>
  219.       </IMAGE_FILE>
  220.     </RELATE>
  221.     <RELATE>
  222.       <UIDRELATE>21</UIDRELATE>
  223.       <IMAGE_FILE>
  224.         <IMAGE_FILE>21_la_pics 001.jpg</IMAGE_FILE>
  225.         <IMAGE_PATH>E:\website_q\cgi_cms\cms_images\</IMAGE_PATH>
  226.         <IMAGE_SIZE>1</IMAGE_SIZE>
  227.         <IMAGE_CAT>1</IMAGE_CAT>
  228.         <PUBLISHDATE>2008-07-26T00:00:00</PUBLISHDATE>
  229.         <STATUSE>1         </STATUSE>
  230.         <LINEUPASSET>
  231.           <ASSET_ID>22</ASSET_ID>
  232.           <LINEUP_ID>64</LINEUP_ID>
  233.         </LINEUPASSET>
  234.       </IMAGE_FILE>
  235.     </RELATE>
  236.   </ARTICLE>
  237. </row>
  238.  
Dec 22 '08 #1
2 2000
Dormilich
8,658 Expert Mod 8TB
it's working for me. maybe it's an issue with the code using the XPath.

by the way: please use code tags [code] when posting code. and since the large text paragraphs are not part of the problem, it'd be good to shorten them.

regards
Dec 22 '08 #2
jkmyoung
2,057 Expert 2GB
It could be namespaces. Does your root node in your xml have anything like this (with the xmlns)?
<root xmlns="www.somenamespace.com">
Dec 22 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: bdinmstig | last post by:
I am building various framework components for my team to use in development, and one of those components is a Facade for reading/writing user preferences. The idea is that preference settings...
0
by: gael.pegliasco | last post by:
Hi, How are you dear and nice helper :) ? I'm trying to test xpath with this simple program : import xml.dom.minidom from xml.xpath.Context import Context import xml.xpath
3
by: Nelson Minar | last post by:
Could someone help me get started using XPath or XQuery in Python? I'm overwhelmed by all the various options and am lacking guidance on what the simplest way to go is. What library do I need to...
13
by: tfsquare | last post by:
All, I am new to XSLT and having some problems understanding the syntax of XPath which selects nodes in the XML document. Consider this bit of XML, which contains three outer XML elements. ...
8
by: Terry P | last post by:
Are there any tools (java classes, tag libraries) which can translate xpath statements into a SQL query? Given an xpath query which has a predicate that filters node values or attributes, I want...
3
by: Kathy Burke | last post by:
Hi again, I'm using the following xpath (works in visualizer) with a SelectSingleNode("xpath") statement. //Station/(WI])]/@order Problem is I get an error "expression passed to this method...
6
by: Chua Wen Ching | last post by:
Hi there, I had this xml file with me (not yet consider implementing xml namespaces yet). <?xml version='1.0'?> <Object> <Windows> <EID>1</EID> <EDesc>Error 1</EDesc> </Windows>
2
by: Locusta | last post by:
Hello, I would like to use XPATH in a C program to retrieve values from XML documents. Did anyone tried this and can give me some advice? Cheers, Locusta
3
by: ziggyware | last post by:
Hi All, I have updated my XPath Generator software: XPath Studio .NET. ( http://www.ziggyware.com/downloads.php?cat_id=2 ) Easily select nodes from an xml file to generate XPath statements ...
2
by: Monty | last post by:
Despite reading posts in Google, I don't understand XPATH. Can someone help me write an XPATH. From Google I think my problem is that the default namespace does not have a prefix. I can't change...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.