11-21-2012
Hi Birei,
Well,
I have long XML file and i want to replace XML twig that start with Text Id=98,12 and many more ..
Is it possible to give the input from external file.
In Perl code you mentioned only one Id=98 ( @id="98" )
q{Text[@Id="98"]/Language}
I want to add more Id and i want to give list of Id from external file from where its read example
cat Text Id_file
98
12
10
55
..
..
..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file called config.xml, it's a simple xml file, and I need use sed/awk to erase some lines.
<machine xsi:type="unix-machineType">
<name>server1</name>
<node-manager>
<name>server1</name>
<listen-address>server1</listen-address>
</node-manager>
... (3 Replies)
Discussion started by: cbo0485
3 Replies
2. Shell Programming and Scripting
We have 2 XML file 1. ORIGINAL.xml file and 2. ATTRIBUTE.xml files, In the ORIGINAL.xml we need some modification as <resourceCode>431048</resourceCode>under <item type="Manufactured"> tag - we need to grab the 431048 value from tag and pass it to database table in unix shell script to find the... (0 Replies)
Discussion started by: balrajg
0 Replies
3. Shell Programming and Scripting
Hi folks,
Need some help with XML to text file parsing , the following is the content of the XML File.
<xn:SubNetwork id="SNJNPRZDCR0R03">
<xn:MeContext id="PRSJU0005">
<xn:VsDataContainer id="PRSJU0005">
<xn:attributes>
... (6 Replies)
Discussion started by: tech_frk
6 Replies
4. Solaris
Hi,
I want to parse an XML File using Shell Script preferably by using awk command,
I/P file is :
<gn:ExternalGsmCell id="016P3A">
<gn:attributes>
<gn:mnc>410</gn:mnc>
<gn:mcc>310</gn:mcc>
<gn:lac>8016</gn:lac>
... (2 Replies)
Discussion started by: tech_frk
2 Replies
5. UNIX for Dummies Questions & Answers
find pattern, delete line with pattern and 3 lines above and 8 lines below the pattern. The pattern is "isup". The entire record with starting tag <record> and ending tag </record> containing the pattern is to be deleted and the rest to be retained.
<record>
... (4 Replies)
Discussion started by: sdesstp
4 Replies
6. Shell Programming and Scripting
Hi..
I have a problem with replacing of id-0f5435080b with some name daily, problem here is whenever I generate xml file it generates unique id for instance say for example today id-0f5435080b and tomorrow it may be id-0f68643508so basically I just want to replace this id with some name say... (5 Replies)
Discussion started by: nex_asp
5 Replies
7. HP-UX
Hi,
Need to replace an XML tag name contents, please provide any suggestions.
Scenario is :
<abc_def>Value_some_content</abc_def>
Expected output :
<abc:def>Value_some_content</abc:def>
We have many tag with different names & contents in a file or a string.
Please help on the... (3 Replies)
Discussion started by: periyasamycse
3 Replies
8. Shell Programming and Scripting
Hi evry1,
This is my 1st post in this forum.Pls help me
I want to extract some data froma xml file which has 2000 lines using shell scripting. Actually my xml file has some "audio and video codes" which i need to arrange in a column wise format after extracting it using shell scripting.I... (4 Replies)
Discussion started by: arun_kohan
4 Replies
9. Shell Programming and Scripting
Hi ,
I have input file as XML. following are input data
#complex.xml
Code:
<?xml version="1.0" encoding="UTF-8"?><TEST_doc xmlns="http://www.w3.org/2001/XMLSchema-instance"> <ENTRY uid="123456"> <protein> <name>PROT001</name> <organism>Human</organism> ... (1 Reply)
Discussion started by: arun_kohan
1 Replies
10. Shell Programming and Scripting
I have below lines in a file
<SubRecord>
<Property Name="Name">QQQQQQQQ</Property>
<Property Name="Prompt">YYYYYYYYYY</Property>
<Property Name="Default">$ddd</Property>
<Property Name="HelpTxt">blahblah</Property>
<Property Name="ParamType">4</Property>
<Property... (8 Replies)
Discussion started by: ratheeshjulk
8 Replies
LEARN ABOUT CENTOS
xml::dom::text
XML::DOM::Text(3) User Contributed Perl Documentation XML::DOM::Text(3)
NAME
XML::DOM::Text - A piece of XML text in XML::DOM
DESCRIPTION
XML::DOM::Text extends XML::DOM::CharacterData, which extends XML::DOM::Node.
The Text interface represents the textual content (termed character data in XML) of an Element or Attr. If there is no markup inside an
element's content, the text is contained in a single object implementing the Text interface that is the only child of the element. If
there is markup, it is parsed into a list of elements and Text nodes that form the list of children of the element.
When a document is first made available via the DOM, there is only one Text node for each block of text. Users may create adjacent Text
nodes that represent the contents of a given element without any intervening markup, but should be aware that there is no way to represent
the separations between these nodes in XML or HTML, so they will not (in general) persist between DOM editing sessions. The normalize()
method on Element merges any such adjacent Text objects into a single node for each block of text; this is recommended before employing
operations that depend on a particular document structure, such as navigation with XPointers.
METHODS
splitText (offset)
Breaks this Text node into two Text nodes at the specified offset, keeping both in the tree as siblings. This node then only contains
all the content up to the offset point. And a new Text node, which is inserted as the next sibling of this node, contains all the
content at and after the offset point.
Parameters:
offset The offset at which to split, starting from 0.
Return Value: The new Text node.
DOMExceptions:
o INDEX_SIZE_ERR
Raised if the specified offset is negative or greater than the number of characters in data.
o NO_MODIFICATION_ALLOWED_ERR
Raised if this node is readonly.
perl v5.16.3 2000-01-31 XML::DOM::Text(3)