Sponsored Content
Top Forums Shell Programming and Scripting Finding a XML element and moving the file Post 302227777 by karansachdeva on Friday 22nd of August 2008 03:00:35 AM
Old 08-22-2008
Thanks fior the reply can you please let me know if i want to check a directory for all the files without reference element and then move them how can i do that.

I think the one you wrote will apply to one file only. I apologise i dont know Unix much so maybe might be wrong somewhere
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding & Moving Oldest File by Parsing/Sorting Date Info in File Names

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

XML root element

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

read XML xml element with REGEXP

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

Need help in finding filesize , moving file , gzipping file

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

Script to put block comment after finding regex in xml file

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

Extracting the Root Element from the XML File

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

Need to find root element name of XML file

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

Find if XML element has a matching required element

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

Extract Element from XML file

<?xml version = '1.0' encoding =... (8 Replies)
Discussion started by: Siva SQL
8 Replies

10. Shell Programming and Scripting

Moving XML tag/contents after specific XML tag within same file

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
RDF::Trine::Node::Literal::XML(3pm)			User Contributed Perl Documentation		       RDF::Trine::Node::Literal::XML(3pm)

NAME
RDF::Trine::Node::Literal::XML - RDF Node class for XMLLiterals METHODS
"new ( $node )" "new ( $string [ , $lang, $datatype ] )" Returns a new XML Literal object. This method can be used in two different ways: It can either be passed a string or an XML::LibXML node. In the case of passing a string, this method follows the same API as the RDF::Trine::Node::Literal constructor, but: o $string must be a well-balanced XML fragment =item * $lang is optional, but if a language code is present it will be used as the value of "xml:lang" attribute(s) on the root XML element(s) of the literal. If the element already has an "xml:lang" attribute it will be overwritten. For the node types that doesn't support adding a language, text and CData, a warning will be issued. =item * $datatype will be ignored and set to 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral' In the case of using a XML::LibXML node $node, the Node may be one of these types or a subclass thereof: o XML::LibXML::Document =item * XML::LibXML::DocumentFragment =item * XML::LibXML::Element =item * XML::LibXML::CDATASection =item * XML::LibXML::NodeList =item * XML::LibXML::Text If the string is not a valid XML fragment, and the $node is not of one of the above types, this method throws a RDF::Trine::Error exception. "xml_element" Returns the XML::LibXML node for the XML Literal. AUTHOR
First created by Gregory Todd Williams <gwilliams@cpan.org>, modfied and maintained by Kjetil Kjernsmo <kjetilk@cpan.org> perl v5.10.1 2011-03-04 RDF::Trine::Node::Literal::XML(3pm)
All times are GMT -4. The time now is 11:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy