thank you so much for the reply and works great for the example I gave earlier. As I was going through your example, I am a little confused as to what it all means. I tried some variations on another set of data and the script seems to break or not bringing back the correct result. Take a look @ the attachment. It is 1 record with many xml tags. However, I want to retrieve the following from the record:
hi experts:
i am using xslt to transform xml in shell.
But can not find root node of source xml, if i remove the naming space definition in source xml, it works fine.
So our the question is how to let xslt know the naming space of srouce xml file?
Thanks for your kindly help in... (0 Replies)
Hi All,
I have some data which needs to be saved in the xml file format.Can you guys please let me know how to do this using perl script.
NOTE: the template of the xml file shall be depending on validation of the data done for some requirements. Basically to summarise, the fields in the xml... (5 Replies)
Hi experts,
I have a set of xml files in folder which has the below field.
<mm:sessionID>157.235.206.12900397BE4:A</mm:sessionID>,
I need to update this field regularly with new session id, which I have it from a login file.
Can anyone tell me how to add a new value in <mm:sessionID>... (3 Replies)
I have some xml files that cannot be read using a standard parser, or I am using the wrong parser. The issues seems to be spaces in some of the tags.
Here is a sample,<UgUn 2 >
<Un>
-0.426753
</Un>
</UgUn>The parser isn't able to find the number 2, so that information is lost, etc. It seems... (16 Replies)
Hi,
I am having an conf file like this:
<Main>
<NODE>
<NODENAME>FRUITS</NODENAME>
<NAME>APPLE</NAME>
<COLOUR>RED</COLOUR>
<NODE>
<IsWrapper/>
<NODENAME>SEASONAL</NODENAME>
<NODE>
<NAME>MANGO</NAME>
<COLOUR>GREEN</COLOUR>
</NODE>
</NODE>... (4 Replies)
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)
Hello,
I have an xml file whose contacts are like below:
<Node>Apple
<B>Value1</B>
<B>Value2</B>
<B>Value3</B>
</Node>
<Node>Mango
<B>Value1</B>
<B>Value2</B>
<B>Value3</B>
</Node>
<Node>Apple
<B>Value1</B>
<B>Value2</B>
<B>Value3</B>
</Node>
<Node>Bannana (3 Replies)
I need to load an XML file and loop through a list of nodes in it to execute a shell script for each one using the attributes for each node as parameters for the script. Any ideas? Any help will be much appreciated. (1 Reply)
I have about 1200 xml files I need to deploy from a 6.4 XML version to 9.0 version of a DTD. So I need a sed command to do lots of of replacements of random variables.
The keyword line is <AUTOEDIT EXP then is will have a variable followed by an equals sign. From that point on I need to break... (5 Replies)
Discussion started by: J-Man
5 Replies
LEARN ABOUT OSX
svn::dump::record
SVN::Dump::Record(3) User Contributed Perl Documentation SVN::Dump::Record(3)NAME
SVN::Dump::Record - A SVN dump record
SYNOPSIS
# SVN::Dump::Record objects are returns by the next_record()
# method of SVN::Dump
DESCRIPTION
An "SVN::Dump::Record" object represents a Subversion dump record.
METHODS
"SVN::Dump" provides the following gourps of methods:
Record methods
new()
Create a new empty "SVN::Dump::Record" object.
type()
Return the record type, as guessed from its headers.
The method dies if the record type cannot be determined.
set_header( $h, $v )
Set the header $h to the value $v.
get_header( $h )
Get the value of header $h.
set_property( $p, $v )
Set the property $p to the value $v.
get_property( $p )
Get the value of property $p.
delete_property( @k )
Delete the
set_text( $t )
Set the value of the text block.
get_text()
Get the value of the text block.
Inner blocks manipulation
A "SVN::Dump::Record" is composed of several inner blocks of various kinds: "SVN::Dump::Headers", "SVN::Dump::Property" and
"SVN::Dump::Text".
The following methods provide access to these blocks:
set_headers_block( $headers )
get_headers_block()
Get or set the "SVN::Dump::Headers" object that represents the record headers.
set_property_block( $property )
get_property_block()
Get or set the "SVN::Dump::Property" object that represents the record property block.
delete_property( @keys )
Delete the given properties. Behave like the builtin "delete()".
set_text_block( $text )
get_text_block()
Get or set the "SVN::Dump::Text" object that represents the record text block.
set_included_record( $record )
get_included_record()
Some special record are actually output recursiveley by svnadmin dump. The "record in the record" is stored within the parent record,
so they are parsed as a single record with an included record.
"get_record()" / "set_record()" give access to the included record.
According to the Subversion sources (subversion/libsvn_repos/dump.c), this is a "delete original, then add-with-history" node. The dump
looks like this:
Node-path: tags/mytag/myfile
Node-kind: file
Node-action: delete
Node-path: tags/mytag/myfile
Node-kind: file
Node-action: add
Node-copyfrom-rev: 23
Node-copyfrom-path: trunk/myfile
Note that there is a single blank line after the first header block, and four after the included one.
update_headers()
Update the various "...-length" headers. Used internally.
You must call this method if you update the inner property or text blocks directly, or the results of "as_string()" will be
inconsistent.
Information methods
has_prop()
Return a boolean value indicating if the record has a property block.
has_text()
Return a boolean value indicating if the record has a text block.
has_prop_only()
Return a boolean value indicating if the record has only a property block (and no text block).
has_prop_or_text()
Return a boolean value indicating if the record has a property block or a text block.
property_length()
Return the length of the property block.
text_length()
Return the length of the text block.
Output method
as_string()
Return a string representation of the record.
Warning: dumping a record currenly gives back the information that was read from the original dump. Which means that if you modified
the property or text block of a record, the headers will be inconstent.
ENCAPSULATION
When using "SVN::Dump" to manipulate a SVN dump, one should not directly access the "SVN::Dump::Headers", "SVN::Dump::Property" and
"SVN::Dump::Text" components of a "SVN::Dump::Record" object, but use the appropriate "set_...()" and "get_...()" methods of the record
object.
These methods compute the appropriate modifications of the header values, so that the "as_string()" method outputs the correct information
after any modification of the record.
SEE ALSO
"SVN::Dump::Headers", "SVN::Dump::Property", "SVN::Dump::Text".
COPYRIGHT & LICENSE
Copyright 2006 Philippe 'BooK' Bruhat, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.0 2008-06-12 SVN::Dump::Record(3)