Extract xml data and create word document using perl.
Hi,
I have large xml data file.I need to extract node and some tags in the node and after I need to create word document. my XMl data is look like as below
i have xml data for more number of students........ like that but now i need to extract only number and address of students.my output look like this below
I need to extract xml data like above format and create word document for that information.
Last edited by vbe; 10-14-2011 at 04:56 AM..
Reason: slash missing in tag....
Hi All, Prepare a perl script for extracting data from xml file. The xml data look like as
AC StartTime="1227858839" ID="88" ETime="1227858837" DSTFlag="false" Type="2" Duration="303" />
<AS StartTime="1227858849" SigPairs="119 40 98 15 100 32 128 18 131 23 70 39 123 20 120 27 100 17 136 12... (3 Replies)
Hi all,
I have the following xml file :
<xmlhead><xmlelement1>element1value</xmlelement1>\0a<xmlelement2>jjasd</xmlelement2>...</xmlhead>
As you can see there are no lines or spaces seperating the elements, just the character \0a. How can i find and print the values of a specific element?... (1 Reply)
Hi all,
I have the following xml document :
<HEADER><El1>asdf</El1> <El2>3</El2> <El3>asad</El3> <El4>asasdf</El4> <El5>asdf</El5> <El6>asdf</El6> <El7>asdf</El7> <El8>A</El8> <El9>0</El9> <El10>75291028141917</El10> <El11>asdf</El11> <El12>sdf</El12> <El13>er</El13> <El14><El15>asdf... (1 Reply)
Please help me out to extract the Data from the XML Log files.
So here is the data
ERROR|2010-08-26 00:05:52,958|SERIAL_ID=128279996|ST=2010-08-2600:05:52|DEVICE=113.2.21.12:601|TYPE=TransactionLog... (9 Replies)
Hi,
i've a string
/u/user/DTE/T_LOGS/20110622_011532_TEST_11_HD_120/HD/TESi T_11_HD_120/hd-12
i need to get string, like
/u/user/DTE/T_LOGS/20110622_011532_TEST_11_HD_120/HD
the words from HD should get deleted, i need only a string till HD, i dont want to use any built in... (4 Replies)
hi,
i have large xml file which contains students information, i need to extract student number and some address tags and create a word document for the extracted data. my data looking llike this
<student>
<number>24</number>
<education>bachelors</education>
... (1 Reply)
Hi All,
Can Someone help me in capturing a word from xml Using sed or awk or any other way in unix.
i have file abc.xml like this
<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
- <NREC xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <HEADER>
<SOURCE>MAIL</SOURCE>... (5 Replies)
Hi ,
I have input file as XML. following are input data
#complex.xml
<?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)
Hi Guys,
I am in a need to extract data from a xml file. The XML file format is as below.
<data jsxnamespace="propsbundle" locales="">
<locale>
<!--Error messages starts-->
<record jsxid="CHARPAIR001" jsxtext=" must be selected"></record>
<record... (1 Reply)
Hello everybody,
I have a double mission with some XML files, which is pretty challenging for my actual beginner UNIX knowledge. I need to extract some strings from multiple XML files and create a new XML file with the searched strings..
The original XML files contain the source code for... (12 Replies)
Discussion started by: milano.churchil
12 Replies
LEARN ABOUT CENTOS
xml::dom::documentfragment
XML::DOM::DocumentFragment(3) User Contributed Perl Documentation XML::DOM::DocumentFragment(3)NAME
XML::DOM::DocumentFragment - Facilitates cut & paste in XML::DOM documents
DESCRIPTION
XML::DOM::DocumentFragment extends XML::DOM::Node
DocumentFragment is a "lightweight" or "minimal" Document object. It is very common to want to be able to extract a portion of a document's
tree or to create a new fragment of a document. Imagine implementing a user command like cut or rearranging a document by moving fragments
around. It is desirable to have an object which can hold such fragments and it is quite natural to use a Node for this purpose. While it is
true that a Document object could fulfil this role, a Document object can potentially be a heavyweight object, depending on the underlying
implementation. What is really needed for this is a very lightweight object. DocumentFragment is such an object.
Furthermore, various operations -- such as inserting nodes as children of another Node -- may take DocumentFragment objects as arguments;
this results in all the child nodes of the DocumentFragment being moved to the child list of this node.
The children of a DocumentFragment node are zero or more nodes representing the tops of any sub-trees defining the structure of the
document. DocumentFragment nodes do not need to be well-formed XML documents (although they do need to follow the rules imposed upon well-
formed XML parsed entities, which can have multiple top nodes). For example, a DocumentFragment might have only one child and that child
node could be a Text node. Such a structure model represents neither an HTML document nor a well-formed XML document.
When a DocumentFragment is inserted into a Document (or indeed any other Node that may take children) the children of the DocumentFragment
and not the DocumentFragment itself are inserted into the Node. This makes the DocumentFragment very useful when the user wishes to create
nodes that are siblings; the DocumentFragment acts as the parent of these nodes so that the user can use the standard methods from the Node
interface, such as insertBefore() and appendChild().
perl v5.16.3 2000-01-31 XML::DOM::DocumentFragment(3)