Sponsored Content
Top Forums Shell Programming and Scripting Split Big XML file Base on tag Post 302985505 by pareshkp on Thursday 10th of November 2016 12:19:02 PM
Old 11-10-2016
Split Big XML file Base on tag

HI
I want to split file base on tag name.

I have few header and footer on file

Code:
<?xml version="1.33" encing="UTF-8"?>
<bulkCmConfigDataFile"
        <xn:SubNetwork id="ONRM_ROOT">
                    
                        <xn:MeContext id="PPP04156">
                <xn:VsDataContainer id="PPP04156">
                    <xn:attributes>
                       <es:vsDataMeContext>
                            <es:multiStandardRbs6k>false</es:multiStandardRbs6k>
                            <es:mixedModeRadio>false</es:mixedModeRadio>
                            <es:mirrorMIBversion>dddd</es:mirrorMIBversion>
                            <es:stnNodes></es:stnNodes>
                        </es:vsDataMeContext>
                    </xn:attributes>
              </xn:VsDataContainer>
          </xn:MeContext>
          
              <xn:MeContext id="PPP04157">
                <xn:VsDataContainer id="PPP04157">
                    <xn:attributes>
                       <es:vsDataMeContext>
                            <es:multiStandardRbs6k>false</es:multiStandardRbs6k>
                            <es:stnNodes></es:stnNodes>
                        </es:vsDataMeContext>
                    </xn:attributes>
              </xn:VsDataContainer>
          </xn:MeContext>
          
       </xn:SubNetwork>
</bulkCmConfigDataFile>

OutPut :- 

FileName Will Ne : ENB_File_PPP04156.xml

<?xml version="1.33" encing="UTF-8"?>
<bulkCmConfigDataFile"
        <xn:SubNetwork id="ONRM_ROOT">
                    <xn:MeContext id="PPP04156">
                <xn:VsDataContainer id="PPP04156">
                    <xn:attributes>
                       <es:vsDataMeContext>
                            <es:multiStandardRbs6k>false</es:multiStandardRbs6k>
                            <es:mixedModeRadio>false</es:mixedModeRadio>
                            <es:mirrorMIBversion>dddd</es:mirrorMIBversion>
                            <es:stnNodes></es:stnNodes>
                        </es:vsDataMeContext>
                    </xn:attributes>
              </xn:VsDataContainer>
          </xn:MeContext>
        </xn:SubNetwork>
</bulkCmConfigDataFile>


FileName Will Ne : ENB_File_PPP04157.xml

<?xml version="1.33" encing="UTF-8"?>
<bulkCmConfigDataFile"
        <xn:SubNetwork id="ONRM_ROOT">
                        <xn:MeContext id="PPP04157">
                <xn:VsDataContainer id="PPP04157">
                    <xn:attributes>
                       <es:vsDataMeContext>
                            <es:multiStandardRbs6k>false</es:multiStandardRbs6k>
                            <es:stnNodes></es:stnNodes>
                        </es:vsDataMeContext>
                    </xn:attributes>
              </xn:VsDataContainer>
          </xn:MeContext>
        </xn:SubNetwork>
</bulkCmConfigDataFile>

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Split a big file into two others files

Hello, i have a very big file that has more then 80 MBytes (100MBytes). So with my CVS Application I cannot commit this file (too Big) because it must have < 80 MBytes. How can I split this file into two others files, i think the AIX Unix command : split -b can do that, buit how is the right... (2 Replies)
Discussion started by: steiner
2 Replies

2. Shell Programming and Scripting

Need to Split Big XML into multiple xmls

Hi friends.. We have urgent requirement.We need to split the big xml having multiple orders into multiple xmls having each order in each xml. For Example In input XMl will be in following format with multiple line orders.. <OrderDetail BillToKey="20100805337" Createuserid="CreateGuestOrder"... (8 Replies)
Discussion started by: dprakash
8 Replies

3. Shell Programming and Scripting

XML tag replacement from different XML file

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

4. Shell Programming and Scripting

How to retrieve the value from XML tag whose end tag is in next line

Hi All, Find the following code: <Universal>D38x82j1JJ </Universal> I want to retrieve the value of <Universal> tag as below: Please help me. (3 Replies)
Discussion started by: mjavalkar
3 Replies

5. Shell Programming and Scripting

How to add the multiple lines of xml tags before a particular xml tag in a file

Hi All, I'm stuck with adding multiple lines(irrespective of line number) to a file before a particular xml tag. Please help me. <A>testing_Location</A> <value>LA</value> <zone>US</zone> <B>Region</B> <value>Russia</value> <zone>Washington</zone> <C>Country</C>... (0 Replies)
Discussion started by: mjavalkar
0 Replies

6. Shell Programming and Scripting

To search for a particular tag in xml and collate all similar tag values and display them count

I want to basically do the below thing. Suppose there is a tag called object1. I want to display an output for all similar tag values under heading of Object 1 and the count of the xmls. Please help File: <xml><object1>house</object1><object2>child</object2>... (9 Replies)
Discussion started by: srkmish
9 Replies

7. Shell Programming and Scripting

Split xml file into multiple xml based on letterID

Hi All, We need to split a large xml into multiple valid xml with same header(2lines) and footer(last line) for N number of letterId. In the example below we have first 2 lines as header and last line as footer.(They need to be in each split xml file) Header: <?xml version="1.0"... (5 Replies)
Discussion started by: vx04
5 Replies

8. Linux

Split a large textfile (one file) into multiple file to base on ^L

Hi, Anyone can help, I have a large textfile (one file), and I need to split into multiple file to break each file into ^L. My textfile ========== abc company abc address abc contact ^L my company my address my contact my skills ^L your company your address ========== (3 Replies)
Discussion started by: fspalero
3 Replies

9. 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

10. UNIX for Beginners Questions & Answers

Grepping multiple XML tag results from XML file.

I want to write a one line script that outputs the result of multiple xml tags from a XML file. For example I have a XML file which has below XML tags in the file: <EMAIL>***</EMAIL> <CUSTOMER_ID>****</CUSTOMER_ID> <BRANDID>***</BRANDID> Now I want to grep the values of all these specified... (1 Reply)
Discussion started by: shubh752
1 Replies
HOBBITWEB(5)							File Formats Manual						      HOBBITWEB(5)

NAME
Xymon web page headers, footers and forms. DESCRIPTION
The Xymon webpages are somewhat customizable, by modifying the header- and footer-templates found in the ~xymon/server/web/ directory. There are usually two or more files for a webpage: A template_header file which is the header for this webpage, and a template_footer file which is the footer. Webpages where entry forms are used have a template_form file which is the data-entry form. With the exception of the bulletin files, the header files are inserted into the HTML code at the very beginning and the footer files are inserted at the bottom. The following templates are available: bulletin A bulletin_header and bulletin_footer is not shipped with Xymon, but if they exist then the content of these files will be inserted in all HTML documents generated by Xymon. The "bulletin_header" contents will appear after the normal header for the webpage, and the "bulletin_footer" will appear just before the normal footer for the webpage. These files can be used to post important informa- tion about the Xymon system, e.g. to notify users of current operational or monitoring problems. acknowledge Header, footer and form template for the Xymon acknowledge alert webpage generated by bb-ack.cgi(1) bb Header and footer for the Xymon Main view webpages, generated by bbgen(1) bb2 Header and footer for the Xymon All non-green view webpage, generated by bbgen(1) bbnk Header and footer for the now deprecated BBNK webpage, generated by bbgen. You should use the newer hobbit-nkview.cgi(1) utility instead, which uses the hobbitnk templates. bbrep Header and footer for the Xymon Main view availability report webpages, generated by bbgen(1) when running in availability report mode. bbsnap Header and footer for the Xymon Main view snapshot webpages, generated by bbgen(1) when running in snapshot report mode. bbsnap2 Header and footer for the Xymon All non-green view snapshot webpage, generated by bbgen(1) when running in snapshot report mode. columndoc Header and footer for the Xymon Column documentation webpages, generated by the bb-csvinfo.cgi(1) utility in the default Xymon con- figuration. confreport Header and footer for the Xymon Configuration report webpage, generated by the hobbit-confreport.cgi(1) utility. Note that there are also "confreport_front" and "confreport_back" templates, these are inserted into the generated report before the hostlist, and before the column documentation, respectively. event Header, footer and form for the Xymon Eventlog report, generated by hobbit-eventlog.cgi(1) findhost Header, footer and form for the Xymon Find host webpage, generated by bb-findhost.cgi(1) graphs Header and footer for the Xymon Graph details webpages, generated by hobbitgraph.cgi(1) hist Header and footer for the Xymon History webpage, generated by bb-hist.cgi(1) histlog Header and footer for the Xymon Historical status-log webpage, generated by hobbitsvc.cgi(1) utility when used to show a historical (non-current) status log. hobbitnk Header and footer for the Xymon Critical Systems view webpage, generated by hobbit-nkview.cgi(1) hostsvc Header and footer for the Xymon Status-log webpage, generated by hobbitsvc.cgi(1) utility when used to show a current status log. info Header and footer for the Xymon Info column webpage, generated by hobbitsvc.cgi(1) utility when used to show the host configuration page. maintact Header and footer for the Xymon webpage, generated by hobbit-enadis.cgi(1) utility when using the Enable/Disable "preview" mode. maint Header, footer and form for the Xymon Enable/disable webpage, generated by hobbit-enadis.cgi(1) nkack Form show on the status-log webpage when viewed from the "Critical Systems" overview. This form is used to acknowledge a critical status by the operators monitoring the Critical Systems view. nkedit Header, footer and form for the Critical Systems Editor, the hobbit-nkedit.cgi(1) utility. replog Header and footer for the Xymon Report status-log webpage, generated by hobbitsvc.cgi(1) utility when used to show a status log for an availability report. report Header, footer and forms for selecting a pre-generated Availability Report. Handled by the bb-datepage.cgi(1) utility. snapshot Header and footer for the Xymon Snapshot report selection webpage, generated by bb-snapshot.cgi(1) SEE ALSO
bbgen(1), hobbitsvc.cgi(1), xymon(7) Xymon Version 4.2.3: 4 Feb 2009 HOBBITWEB(5)
All times are GMT -4. The time now is 12:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy