Sponsored Content
Top Forums UNIX for Beginners Questions & Answers General Purpose XML Processing Post 302973809 by RavinderSingh13 on Sunday 22nd of May 2016 03:30:29 AM
Old 05-22-2016
Hello Corona688(One of the Gems of this forum),

First of all a big THANK YOU for writing this brilliant code Smilie(fan of you always). Could you please post a example or complex example for a Input_file and code too here, I apologies to bother you on same but it will be helpful for us to understand the code more clearly. I will be grateful to you if you could do so.

Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Looking for a general purpose System Monitor

Does anyone have any scripts or suggestions on a general purpose Unix/Linux monitoring tool? (5 Replies)
Discussion started by: darthur
5 Replies

2. Shell Programming and Scripting

need help on xml processing

I am trying to divide a xml file(my.xml) like this: <?xml version="1.0" encoding="UTF-8"?> <Proto PName="hmmmmmmm"> <Menu id="A" ver="1"> <P> <P name="AA" Type="X"/> <P name="BB" Type="Y"/> <P name="CC" Type="Z"/> </P> ... (4 Replies)
Discussion started by: demoprog
4 Replies

3. Shell Programming and Scripting

CSV processing to XML

Hi, i am really fresh with shell scripting and programming, i have an issue i am not able to solve to populate data on my server for Cisco IP phones. I have CSV file within the following format: ;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;... (9 Replies)
Discussion started by: angel2008
9 Replies

4. Programming

help me with perl script xml processing

Hi everyone, I have Xml files in a folder, I need to extract some attribute values form xml files and store in a hash. My xml file look like this. <?xml version="1.0" encoding="UTF-8"?> <Servicelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"... (0 Replies)
Discussion started by: pavani reddy
0 Replies

5. Shell Programming and Scripting

Help with XML file processing

I need to get all session_ID 's for product="D-0002" from a XML file: Sample input: <session session_ID="6411206" create_date="2012-04-10-10.22.13.000000"> <marketing_info> <program_id>D4AWFU</program_id> <subchannel_id>abc</subchannel_id> </marketing_info> ... (1 Reply)
Discussion started by: karumudi7
1 Replies

6. Shell Programming and Scripting

processing xml with awk

With the following input sample extracted from a xml file <rel ver="123"> <mod name="on"> <node env="ac" env="1"> <ins ip="10.192.0.1"/> <ins ip="10.192.0.2"/> ... (1 Reply)
Discussion started by: cabrao
1 Replies

7. UNIX for Beginners Questions & Answers

General Purpose Date Script

There must be thousands of one-off solutions scattered around this forum. GNU Date is so handy because it's general but if they're asking they probably don't have it. We have some nice scripts but they tend to need dates formatted in a very particular way. This is a rough approximation which... (18 Replies)
Discussion started by: Corona688
18 Replies
Bezier(3pm)						User Contributed Perl Documentation					       Bezier(3pm)

NAME
Math::Bezier - solution of Bezier Curves SYNOPSIS
use Math::Bezier; # create curve passing list of (x, y) control points my $bezier = Math::Bezier->new($x1, $y1, $x2, $y2, ..., $xn, $yn); # or pass reference to list of control points my $bezier = Math::Bezier->new([ $x1, $y1, $x2, $y2, ..., $xn, $yn]); # determine (x, y) at point along curve, range 0 -> 1 my ($x, $y) = $bezier->point(0.5); # returns list ref in scalar context my $xy = $bezier->point(0.5); # return list of 20 (x, y) points along curve my @curve = $bezier->curve(20); # returns list ref in scalar context my $curve = $bezier->curve(20); DESCRIPTION
This module implements the algorithm for the solution of Bezier curves as presented by Robert D. Miller in Graphics Gems V, "Quick and Simple Bezier Curve Drawing". A new Bezier curve is created using the new() constructor, passing a list of (x, y) control points. use Math::Bezier; my @control = ( 0, 0, 10, 20, 30, -20, 40, 0 ); my $bezier = Math::Bezier->new(@control); Alternately, a reference to a list of control points may be passed. my $bezier = Math::Bezier->new(@control); The point($theta) method can then be called on the object, passing a value in the range 0 to 1 which represents the distance along the curve. When called in list context, the method returns the x and y coordinates of that point on the Bezier curve. my ($x, $y) = $bezier->point(0.5); print "x: $x y: $y When called in scalar context, it returns a reference to a list containing the x and y coordinates. my $point = $bezier->point(0.5); print "x: $point->[0] y: $point->[1] "; The curve($n) method can be used to return a set of points sampled along the length of the curve (i.e. in the range 0 <= $theta <= 1). The parameter indicates the number of sample points required, defaulting to 20 if undefined. The method returns a list of ($x1, $y1, $x2, $y2, ..., $xn, $yn) points when called in list context, or a reference to such an array when called in scalar context. my @points = $bezier->curve(10); while (@points) { my ($x, $y) = splice(@points, 0, 2); print "x: $x y: $y "; } my $points = $bezier->curve(10); while (@$points) { my ($x, $y) = splice(@$points, 0, 2); print "x: $x y: $y "; } AUTHOR
Andy Wardley <abw@kfs.org> SEE ALSO
Graphics Gems 5, edited by Alan W. Paeth, Academic Press, 1995, ISBN 0-12-543455-3. Section IV.8, 'Quick and Simple Bezier Curve Drawing' by Robert D. Miller, pages 206-209. perl v5.10.1 2000-10-19 Bezier(3pm)
All times are GMT -4. The time now is 08:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy