Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Reading xml files including other xml files using xpath within the PERL forums, part of the Web Development category; Hi, I have an xml file (file1.xml) that includes another xml file (file2.xml). file2.xml has tag with name and value attributes, where name is a string and value is path ...
|
|||||||
| PERL PERL Scripts - Tips, Tricks, Issues, Latest News, PERL Resource and PERL related topics can be discussed in this forum. |
![]() |
| LinkBack | Thread Tools | Display Modes |
|
|||
|
Reading xml files including other xml files using xpath
Hi,
I have an xml file (file1.xml) that includes another xml file (file2.xml). file2.xml has tag with name and value attributes, where name is a string and value is path to a directory. file1.xml has tags with script and inputfile attributes, where script is a command to run and inputfile is the input argument to the command. inputfile is in the form of ${//dir[@name='mypath']/@value}/myfile where mypath is the "name" in one of the dir tags in file2.xml whose value is /ROOTDIRECTORY/MYDIRECTORY I need to read the value of "inputfile" attribute from file1.xml, using xpath in perl in such a way that it returns /ROOTDIRECTORY/MYDIRECTORY/myfile. The code I have written now gives me ${//dir[@name='mypath']/@value}/myfile. Can someone help please? Thanks in advance. Sajith |
| Sponsored Links |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| related to files | lipusipu44 | C and C++ | 0 | 12-14-2008 02:48 PM |
| rename the files | sarathi trichy | Windows | 1 | 12-14-2007 10:09 AM |
| novaPDF Lite allows you to create PDF files from any printable document, including em | JobHelper | Geeks Lounge | 0 | 09-17-2007 03:40 PM |
| East-Tec Backup 2007 backs up and protects the files and data you care about (files, | JobHelper | Geeks Lounge | 0 | 09-03-2007 01:20 PM |
| Zip files in telnet | Manojks | Windows | 1 | 02-06-2007 04:39 AM |