Hi all,
I have a problem in handling files through C.
here is the problem im having:
i will query the database (for instance consider employees table )
for empno,ename,job,salary fields.The query returns me some 100 of rows. now i need to place them in a file in row wise pattern as they... (3 Replies)
Hi all,
I got a little issue here. Imagine that I have more than one process accessing one file. Is it possible to know which process(es) are accessing that file when I open the file??
Thanks for the help.
Best regards,
Ernesto (2 Replies)
Hi,
I have a log file which runs into 3 to 5 GB.
We store this typically for 6 months. When a new month starts we move the previous month into a 9 month back up log (file.9m) and delete the last month of the 9 month back up.
Iam using awk to find the data and cat to join the files like... (3 Replies)
sir i have to get first line from a file
for example
>cat file1
abc
zxc
asd
adsf
from that file1 i need only first line
expected result
>abc
please help me ! (1 Reply)
my input for a script is another csv file
but in that file say 7 lines are there ...
how can i get line by line to that input
for example :
>cat link.csv
www.yahoo.com,yahoo
www.google.com,google
www.unix.com,unix
another file
in that file i need to ping the above links
... (2 Replies)
I have been doing automation of daily check activity for a server, i have been using sqls to retrive the data and while loop for reading the data from the file for several activities. BUT i got a show stopper the below one.. where the data is getting store in $temp_file, but not being read by while... (1 Reply)
$# some text
$$ some text
$@ some text
$$. some text
Mg1 some text
Mg2 some text
.
.
.
Mg10 some text
The above 10 lines are to be extracted except the lines starting from $#,$$.,... (4 Replies)
Specifically on RHEL 5.7.
When does the underlying ksh process open and close files? Every time they're accessed, or as little as possible?
Say you have some script like:
CreateFiles()
{
grep "<VALUE1>" ${infile} >> ${outfile}
grep "<VALUE2>" ${infile} >> ${outfile}
...... (4 Replies)
Hi Team,
I am trying to cut a large file into multiple files. It has
Header
50,050 records
Trailer
-------------------------------------------
I need to cut the files into multiple files of 1000 records and should have the same header and trailer as the original files.
... (4 Replies)
I have a file
1
298167
298168
1093209
1093210
1422663
I want to write a code where in I want to read contents of above file
like first read is 1
second read is 298167
Substract second read from first and if this is greater than or less than 99,999.
Similarly I want to traverse thru... (3 Replies)
Discussion started by: Guru148
3 Replies
LEARN ABOUT PHP
xslt_set_scheme_handlers
XSLT_SET_SCHEME_HANDLERS(3) 1 XSLT_SET_SCHEME_HANDLERS(3)xslt_set_scheme_handlers - Set the scheme handlers for theXSLTprocessorSYNOPSIS
void xslt_set_scheme_handlers (resource $xh, array $handlers)
DESCRIPTION
Registers the scheme handlers (XPath handlers) for the document.
PARAMETERS
o $
xh -The XSLT processor link identifier, created with xslt_create(3).
o $handlers
- An array with the following keys: "get_all", "open", "get", "put", and "close". Every entry must be a function name or an array
in the following format: array($obj, "method"). Note that the given array does not need to contain all of the different scheme
handler elements (although it can), but it only needs to conform to the "handler" => "function" format described above. Each of
the individual scheme handler functions called are in the formats below:
string get_all(resource processor, string scheme, string rest)
resource open(resource processor, string scheme, string rest)
int get(resource processor, resource fp, string &data)
int put(resource processor, resource fp, string data)
void close(resource processor, resource fp)
RETURN VALUES
No value is returned.
EXAMPLES
Example #1
xslt_set_scheme_handlers(3) example
For example, here is an implementation of the "file_exists()" PHP function.
<?php
// Definition of the handler
function mySchemeHandler($processor, $scheme, $rest)
{
$rest = substr($rest,1); // to remove the first / automatically added by the engine
if ($scheme == 'file_exists') {
// result is embedded in a small xml string
return '<?xml version="1.0" encoding="UTF-8"?><root>' . (file_exists($rest) ? 'true' : 'false') . '</root>';
}
}
$SchemeHandlerArray = array('get_all' => 'mySchemeHandler');
// Start the engine
$params = array();
$xh = xslt_create();
xslt_set_scheme_handlers($xh, $SchemeHandlerArray);
$result = xslt_process($xh, "myFile.xml", "myFile.xsl", NULL, array(), $params);
xslt_free($xh);
echo $result;
?>
Then, inside the stylesheet, you can test whether a certain file exists with:
<xsl:if test="document('file_exists:anotherXMLfile.xml')/root='true'">
<!-- The file exist -->
</xsl:if>
SEE ALSO xslt_set_scheme_handler(3).
PHP Documentation Group XSLT_SET_SCHEME_HANDLERS(3)