08-22-2008
I got this below error while running this script...
Enter dir name frm whr u wanna search:--give the full path--
/dfds03/editst6/karan
Enter destination dir path:
/dfds03/editst6/guru
find: 0652-009 There is a missing conjunction
Can you tell what the issue is...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to write a script that will look in an /exports folder for the oldest export file and move it to a /staging folder. "Oldest" in this case is actually determined by date information embedded in the file names themselves.
Also, the script should only move a file from /exports to... (6 Replies)
Discussion started by: nikosey
6 Replies
2. Shell Programming and Scripting
Hi All
Can someone please help me with this awk to search an element in a XML file with a particular value and then change the root element.
Thanks & Regards
Karan (9 Replies)
Discussion started by: karansachdeva
9 Replies
3. UNIX Desktop Questions & Answers
Hi, I would need to read an xml element from an xml file to a local variable. Please could you help me with a shell script to get so? Considering that I have a file called file.xml like below:
<header>
<description>This is the description</description>
<content>This is the... (2 Replies)
Discussion started by: oscarmon
2 Replies
4. Shell Programming and Scripting
Hi ,
Please help with the following questions
1) how can i find size of a file ? i have written du -k $flname > s1 . Is this right ?
Any other better suggeastions ?
2) how do I use mv command for moving the file ? I need the syntax with some examples
3) Command for printing the total... (1 Reply)
Discussion started by: Learning!
1 Replies
5. Shell Programming and Scripting
hi,
i need my bash script to find regex in xml file.. and comment 2 lines before and after the line that contains regex.. can't use # needs to be <!-- at the beginning and --> and the end of the comment.
so eg..
first block
<filter>
<filter-name>MyRegEx</filter-name>
... (11 Replies)
Discussion started by: Poki
11 Replies
6. Shell Programming and Scripting
Any help to extract the root element from an XML file will be appreciated.
Example: test.xml
<?xml version="1.0" encoding="utf-8" ?>
<TestXMLMessage>
<TestRec>
<ID>1000</ID>
</TestRec>
</TestXMLMessage>
Wanted to extract the TestXMLMessage.
Regards,
Chari (6 Replies)
Discussion started by: sree_chari
6 Replies
7. Shell Programming and Scripting
Given this XML:
<?xml version="1.0"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
... (2 Replies)
Discussion started by: ricksj
2 Replies
8. Shell Programming and Scripting
I want to check if every <Part> element has corresponding <Description> in this sample XML.
....<Lot Of XML>
<Inv lineNumber="2">
<Item>
... (4 Replies)
Discussion started by: kchinnam
4 Replies
9. UNIX for Dummies Questions & Answers
<?xml version = '1.0' encoding =... (8 Replies)
Discussion started by: Siva SQL
8 Replies
10. Shell Programming and Scripting
Hi Forum.
I have an XML file with the following requirement to move the <AdditionalAccountHolders> tag and its content right after the <accountHolderName> tag within the same file but I'm not sure how to accomplish this through a Unix script.
Any feedback will be greatly appreciated.
... (19 Replies)
Discussion started by: pchang
19 Replies
LEARN ABOUT DEBIAN
xml::parser::lite::tree
XML::Parser::Lite::Tree(3pm) User Contributed Perl Documentation XML::Parser::Lite::Tree(3pm)
NAME
XML::Parser::Lite::Tree - Lightweight XML tree builder
SYNOPSIS
use XML::Parser::Lite::Tree;
my $tree_parser = XML::Parser::Lite::Tree::instance();
my $tree = $tree_parser->parse($xml_data);
OR
my $tree = XML::Parser::Lite::Tree::instance()->parse($xml_data);
DESCRIPTION
This is a singleton class for parsing XML into a tree structure. How does this differ from other XML tree generators? By using
XML::Parser::Lite, which is a pure perl XML parser. Using this module you can tree-ify simple XML without having to compile any C.
For example, the following XML:
<foo woo="yay"><bar a="b" c="d" />hoopla</foo>
Parses into the following tree:
'children' => [
{
'children' => [
{
'children' => [],
'attributes' => {
'a' => 'b',
'c' => 'd'
},
'type' => 'element',
'name' => 'bar'
},
{
'content' => 'hoopla',
'type' => 'text'
}
],
'attributes' => {
'woo' => 'yay'
},
'type' => 'element',
'name' => 'foo'
}
],
'type' => 'root'
};
Each node contains a "type" key, one of "root", "element" and "text". "root" is the document root, and only contains an array ref
"children". "element" represents a normal tag, and contains an array ref "children", a hash ref "attributes" and a string "name". "text"
nodes contain only a "content" string.
METHODS
"instance()"
Returns an instance of the tree parser.
"new( options... )"
Creates a new parser. Valid options include "process_ns" to process namespaces.
"parse($xml)"
Parses the xml in $xml and returns the tree as a hash ref.
AUTHOR
Copyright (C) 2004-2008, Cal Henderson, <cal@iamcal.com>
SEE ALSO
XML::Parser::Lite.
perl v5.12.3 2011-06-04 XML::Parser::Lite::Tree(3pm)