14 Replies Latest reply on Dec 2, 2009 4:42 AM by sathiyabala

    How to get previous tag name from a xml in java

    sathiyabala

      Hai

       

       

            I need to get the previous tag name from a xml in java.

       

           I got the current tagname , i need to get the previous tagname

       

         

      NodeList parentactionList = lParentRule.getElementsByTagName(

      "parentactiondetails");

       

       

      i use this way of getting the the current tag name, i need to get the previous tag name ie.. before "parentactiondetails"

       

       

      for sample

       

      </parentruledetails>
      </Parentrule>
      </SingleParentRule>
      <parentactiondetails ACTION_FLAG="RulePass" PARENT_RULE_CODE="PR626"/>
      <ParentCompliance>

       

       

      i have xml like this i am getting the "parentactiondetails " ...  now i need to get the previous tag name </SingleParentRule> in java

       

       

      Can any one help me,

       

       

        • 1. Re: How to get previous tag name from a xml in java
          RK...

          Hi,

          Can you try this sample,

           

           

          DOMParser parser = new DOMParser();
          parser.parse(new InputSource(new FileInputStream(new File("sample.xml"))));
          Document doc = parser.getDocument();
          
          NamedNodeMap attrAction = doc.getElementsByTagName(
                                   "parentactiondetails").item(0).getAttributes();
          
          System.out.println(attrAction.getNamedItem("ACTION_FLAG")
                    .getNodeValue());
          
          //Previous tag
          NamedNodeMap attrRule = doc.getElementsByTagName(
                              "SingleParentRule").item(0).getAttributes();
                              
          System.out.println(attrRule.getNamedItem("PARENT_RULE_CODE")
                    .getNodeValue());
          
          
          
          
          

           

          sample.xml looks like,

           

          <?xml version="1.0" encoding="UTF-8"?>
          
          <ParentCompliance>
               <Parentrule></Parentrule>
               <parentruledetails></parentruledetails>
               <SingleParentRule PARENT_RULE_CODE="PR626"></SingleParentRule>
               <parentactiondetails ACTION_FLAG="RulePass" PARENT_RULE_CODE="PR626"/>
          </ParentCompliance>
          

          • 2. Re: How to get previous tag name from a xml in java
            sathiyabala Level 1

            Hai

             

              it is not working...

             

              I am getting the previous tag as the PR628 of the PARENT_RULE_CODE..

             

              I need the previous tag name </Singleparentrule>

             

              But it is giving the value of that attribute...

             

              still my question is not been answered yet

            • 3. Re: How to get previous tag name from a xml in java
              RK... Level 3

              You can use getPreviousSibling() method of Node class, The output of following sample is, "SingleParentRule".

               

               

              Element element = doc.getDocumentElement();
              NodeList children = element.getChildNodes();
              
              for (int i = 0; i < children.getLength(); i++) {
                   Node nd = children.item(i);
                   
                   if (nd.getNodeName().equals("parentactiondetails")) {
                        Node sib = nd.getPreviousSibling().getPreviousSibling();
                        System.out.println(sib.getNodeName());
                   }
              }
                                  
              

               

              or you can use the following code

               

              Node nd = doc.getElementsByTagName("parentactiondetails").item(0);
              Node sibling = nd.getPreviousSibling().getPreviousSibling();
              System.out.println(sibling.getNodeName());
              

              • 4. Re: How to get previous tag name from a xml in java
                sathiyabala Level 1

                sorry

                that is right but even though i am not getting

                the correct value....     

                 

                i am having my xml in this way....

                 

                <SingleParentRule CHILD_TYPE="ALL">
                <Parentrule>
                <parentruledetails COMMENTS="1CUSTRULE_PARENT_CROSSREF_FAIL">
                <parentscope DEVICE_TYPE_NAME="Switch" />
                <parentmultiscope COLUMN_INDEX="0" />
                <ParentCommand>
                <Command ChildType="Console" />
                </ParentCommand>
                <parentcustomdetails CHILD_TYPE="Console" />
                <parentcustomdetails CHILD_TYPE="Console" />
                <parentcustomconsole CHILD_TYPE="Console" />
                <parentactiondetails ACTION_FLAG="CrossRef" PARENT_RULE_CODE="PR625"/>
                <parentcrossrefdetails ACTION_FLAG="CrossRef" />
                <parentcrossrefdetails ACTION_FLAG="CrossRef" />
                <parentcrossrefconsole ACTION_FLAG="CrossRef" />
                <ParentCompliance>
                <PRComp comments="Group Policy is an important and useful addition "/>
                <PRComp comments="This is the compliance for the department of Security agency" />
                <PRComp comments="This is the compliance from the National Security Agency" />
                <PRComp comments="he Center for Internet Security (CIS) is a not-for-profit "/>
                <PRComp comments="This is a Cisco document. It outlines the key security "/>
                <PRComp comments="This is the best practices from industry experts "/>
                </ParentCompliance>
                <parentriskrecommendationdetails ACTION_FLAG="CrossRef"/>
                </parentruledetails>
                </Parentrule>
                </SingleParentRule>
                <parentactiondetails ACTION_FLAG="RulePass" PARENT_RULE_CODE="PR626"/>

                 

                so inside this <SingleParentRule> another <parentactiondetails > is there so it is fetching the before tag of that inside <parentactiondetails >

                 

                i want the close tag of  </SingleParentRule> so that the values i can fetch it ... after the close tag of </SingleParentRule>

                <parentactiondetails > i need the before tag of this to be  close tag of </SingleParentRule>

                 

                • 5. Re: How to get previous tag name from a xml in java
                  RK... Level 3

                  As per W3C standards, you can't have multiple root elements. So I slightly changed your xml, put your contents in <Rules> element.

                   

                  If you need to get SingleParentRule element, the following sample would do

                   

                  Element element = doc.getDocumentElement();
                  NodeList children = element.getChildNodes();
                   
                  for (int i = 0; i < children.getLength(); i++) {
                        Node nd = children.item(i);
                        
                        if (nd.getNodeName().equals("parentactiondetails")) {
                              Node sib = nd.getPreviousSibling().getPreviousSibling();
                              System.out.println(sib.getNodeName());
                        }
                  }
                  

                   

                  XML templete,

                   

                  <?xml version="1.0" encoding="UTF-8"?>
                  
                  <Rules>
                       Your contents...
                  </Rules>
                  
                  

                  • 6. Re: How to get previous tag name from a xml in java
                    sathiyabala Level 1

                    still i am not able to get the correct value...

                     

                     

                    i used the way wat u said it is not even going inside the if condition

                     

                     

                    below is my actual xml as before i asked i need the before tag name of

                    <parentactiondetails>

                     

                    ie  the closing tag of </Singleparentrule>

                     

                     

                    i have attached the xml also

                     

                    pl reply me as soon as possible

                     

                     

                     

                    <?xml version="1.0" encoding="UTF-8"?>
                    <GRC>
                    <ParentInventory>
                    <Vendor comment="" createdBy="root" vendorCode="1001" vendorName="Cisco">
                    <DeviceType createdBy="root" devTypeCode="1001" devTypeName="Router" vendorCode="1001">
                    <Series createdBy="root" devTypeCode="1002" seriesCode="1110" seriesName="2800" vendorCode="1001">
                    <Model createdBy="root" devTypeCode="1002" modelCode="1459" modelName="4506" seriesCode="1110" vendorCode="1001">
                    <Sub createdBy="root" devTypeCode="1002" modelCode="1459" seriesCode="1110" subCode="1695" subName="CAT4500-SUP4" vendorCode="1001">
                    <CodeVersion createdBy="root" devTypeCode="1002" modelCode="1459" seriesCode="1110" startCode="2207" startName="12.2(25)EWA2" subCode="1695" vendorCode="1001">
                    <ImageName createdBy="root" devTypeCode="1002" endCode="5508" endName="Standard" modelCode="1459" seriesCode="1110" startCode="2207" subCode="1695" vendorCode="1001"/>
                    </CodeVersion>
                    <CodeVersion createdBy="root" devTypeCode="1002" modelCode="1459" seriesCode="1110" startCode="2225" startName="12.2(5)T" subCode="1695" vendorCode="1001"/>
                    </Sub>
                    </Model>
                    </Series>
                    </DeviceType>
                    </Vendor>
                    </ParentInventory>
                    <Parentrule>
                    <parentruledetails COMMENTS="1PARENT_RULEFILT_AUDITPASS" CREATED_BY="root" DEVICE_LEVEL_FLAG="Configuration" PARENT_RULE_CODE="PR626" PARENT_RULE_TYPE="SPR_AP" RULE_NAME="1PARENT_RULEFILT_AUDITPASS">
                    <parentscope DEVICE_TYPE_NAME="Switch" END_CODE_VERNAME="Standard" MODEL_NAME="3750-24PS" PARENT_RULE_CODE="PR626" SERIES_NAME="3750" ST_CODE_VERNAME="12.2(25)SEE2" SUP_CPU_NAME="3750" VENDOR_NAME="Cisco"/>
                    <parentmultiscope COLUMN_INDEX="0" DEVICE_TYPE_NAME="Switch" END_CODE_VERNAME="Standard" MODEL_NAME="3750-24PS" MULTI_SCOPE_CODE="{1=1001~1002~ 1010~ 1131~ 1190~ 2041~E~5255}" MULTI_SCOPE_NAME="{1=Cisco~Switch~3750~3750-24PS~3750~12.2(25)SEE2~E~Standard}" OPERATOR="E" PARENT_RULE_CODE="PR626" SERIES_NAME="3750" ST_CODE_VERNAME="12.2(25)SEE2" SUP_CPU_NAME="3750" VENDOR_NAME="Cisco"/>
                    <SingleParentRule CHILD_TYPE="ALL" COLUMN_INDEX="0" FILT_CONDN="PA" PARENT_RULE_CODE="PR626" RULE_CODE="PR625[AND]," RULE_TYPE_FLAG="singleparentrule">
                    <Parentrule>
                    <parentruledetails COMMENTS="1CUSTRULE_PARENT_CROSSREF_FAIL" CREATED_BY="root" DEVICE_LEVEL_FLAG="Configuration" PARENT_RULE_CODE="PR625" PARENT_RULE_TYPE="PCR_CR" RULE_NAME="1CUSTRULE_PARENT_CROSSREF_FAIL">
                    <parentscope DEVICE_TYPE_NAME="Switch" END_CODE_VERNAME="Standard" MODEL_NAME="3750-24PS" PARENT_RULE_CODE="PR625" SERIES_NAME="3750" ST_CODE_VERNAME="12.2(25)SEE2" SUP_CPU_NAME="3750" VENDOR_NAME="Cisco"/>
                    <parentmultiscope COLUMN_INDEX="0" DEVICE_TYPE_NAME="Switch" END_CODE_VERNAME="Standard" MODEL_NAME="3750-24PS" MULTI_SCOPE_CODE="{1=1001~1002~ 1010~ 1131~ 1190~ 2041~E~5255}" MULTI_SCOPE_NAME="{1=Cisco~Switch~3750~3750-24PS~3750~12.2(25)SEE2~E~Standard}" OPERATOR="E" PARENT_RULE_CODE="PR625" SERIES_NAME="3750" ST_CODE_VERNAME="12.2(25)SEE2" SUP_CPU_NAME="3750" VENDOR_NAME="Cisco"/>
                    <ParentCommand>
                    <Command ChildType="Console" cmdCode="37135" cmdName="login authentication &lt;string&gt;"/>
                    </ParentCommand>
                    <parentcustomdetails CHILD_TYPE="Console" CMD_CODE="37135" CMD_NAME="login authentication [string]" CMD_OPTION="login authentication " COLUMN_INDEX="0" CONDN_OPER="exists" CONDN_VALUE="True" PARENT_RULE_CODE="PR625" RULE_TYPE_FLAG="Customrule"/>
                    <parentcustomdetails CHILD_TYPE="Console" CMD_CODE="37135" CMD_NAME="login authentication [string]" CMD_OPTION="string" COLUMN_INDEX="1" CONDN_OPER="equalsto" CONDN_VALUE="cisco" PARENT_RULE_CODE="PR625" RULE_TYPE_FLAG="Customrule"/>
                    <parentcustomconsole CHILD_TYPE="Console" CONSOLE_NUM="Any" PARENT_RULE_CODE="PR625"/>
                    <parentactiondetails ACTION_FLAG="CrossRef" PARENT_RULE_CODE="PR625"/>
                    <parentcrossrefdetails ACTION_FLAG="CrossRef" CHILD_TYPE="Console" CMD_CODE="37135" CMD_NAME="login authentication [string]" CMD_OPTION="login authentication " COLUMN_INDEX="0" CONDN_OPER="exists" CONDN_VALUE="True" PARENT_RULE_CODE="PR625"/>
                    <parentcrossrefdetails ACTION_FLAG="CrossRef" CHILD_TYPE="Console" CMD_CODE="37135" CMD_NAME="login authentication [string]" CMD_OPTION="string" COLUMN_INDEX="1" CONDN_OPER="equalsto" CONDN_VALUE="AAAAAA" PARENT_RULE_CODE="PR625"/>
                    <parentcrossrefconsole ACTION_FLAG="CrossRef" CHILD_TYPE="Console" CONSOLE_NUM="Any" PARENT_RULE_CODE="PR625"/>
                    <ParentCompliance>
                    <PRComp comments="Group Policy is an important and useful addition to your Active Directory deployment. Managing your internal network and ensuring compliance .Group Policies are a set of &quot;rules&quot; that are applied to different parts of a Windows-based network" compCode="1006" compName="INTERNAL GROUP POLICY" createdBy="root" url="http://www.INTERNAL GROUP POLICY.com"/>
                    <PRComp comments="This is the compliance for the department of Security agency" compCode="1012" compName="DISA" createdBy="root" url="http://iase.disa.mil/stigs/checklist/"/>
                    <PRComp comments="This is the compliance from the National Security Agency" compCode="1013" compName="NSA" createdBy="root" url="http://checklists.nist.gov/chklst_detail.cfm?confi"/>
                    <PRComp comments="he Center for Internet Security (CIS) is a not-for-profit organization that helps enterprises reduce the risk of business and e-commerce disruptions resulting from inadequate technical security controls, and provides enterprises with resources for measuring information security status and making rational security investment decisions" compCode="1020" compName="CIS" createdBy="root" url="http://www.cisecurity.org/"/>
                    <PRComp comments="This is a Cisco document. It outlines the key security elements identified for Network Security Baseline, along with implementation guidelines to assist in their design, integration, and deployment in production networks. " compCode="1022" compName="Cisco Secuirty Baseline" createdBy="root" url="http://www.cisco.com/en/US/docs/solutions/Enterpri"/>
                    <PRComp comments="This is the best practices from industry experts to help make audit recommendations in a customers environment. " compCode="1023" compName="360 GRC Best Practice" createdBy="root" url="http://www.360grc.com"/>
                    </ParentCompliance>
                    <parentriskrecommendationdetails ACTION_FLAG="CrossRef" AUDIT_RESULTS="Both_pass_fail_result" CHILD_TYPE="ALL" CMD_CODE="fdg" COMMAND_REF="dfs" DEFINITION="dfgd" DEVICE_RECOM_CATEGORY_CODE="IP - Addressing Services" DEVICE_RISK_CATEGORY_CODE="IP - Addressing Services" DISP_LEVEL="Parent and child result" PARENT_RULE_CODE="PR625" RATING1="2" RATING1_NAME="DISA" RATING2="2" RATING2_NAME="NSA" RATING3="2" RATING3_NAME="Cisco Secuirty Baseline" RATING4="2" RATING4_NAME="CIS" RATING5="2" RATING5_NAME="360 GRC Best Practice" RATING6="2" RATING6_NAME="INTERNAL GROUP POLICY" RATING_IMPACT="Low" RATING_PRIORITY="Low" RATING_URGENCY="Low" RECOMENDATION="ss" WEB_REF="sfs" WEIGHTING1="10" WEIGHTING1_NAME="DISA" WEIGHTING2="10" WEIGHTING2_NAME="NSA" WEIGHTING3="10" WEIGHTING3_NAME="Cisco Secuirty Baseline" WEIGHTING4="10" WEIGHTING4_NAME="CIS" WEIGHTING5="10" WEIGHTING5_NAME="360 GRC Best Practice" WEIGHTING6="10" WEIGHTING6_NAME="INTERNAL GROUP POLICY"/>
                    </parentruledetails>
                    </Parentrule>
                    </SingleParentRule>
                    <parentactiondetails ACTION_FLAG="RulePass" PARENT_RULE_CODE="PR626"/>
                    <ParentCompliance>
                    <PRComp comments="Group Policy is an important and useful addition to your Active Directory deployment. Managing your internal network and ensuring compliance .Group Policies are a set of &quot;rules&quot; that are applied to different parts of a Windows-based network" compCode="1006" compName="INTERNAL GROUP POLICY" createdBy="root" url="http://www.INTERNAL GROUP POLICY.com"/>
                    <PRComp comments="This is the compliance for the department of Security agency" compCode="1012" compName="DISA" createdBy="root" url="http://iase.disa.mil/stigs/checklist/"/>
                    <PRComp comments="This is the compliance from the National Security Agency" compCode="1013" compName="NSA" createdBy="root" url="http://checklists.nist.gov/chklst_detail.cfm?confi"/>
                    <PRComp comments="he Center for Internet Security (CIS) is a not-for-profit organization that helps enterprises reduce the risk of business and e-commerce disruptions resulting from inadequate technical security controls, and provides enterprises with resources for measuring information security status and making rational security investment decisions" compCode="1020" compName="CIS" createdBy="root" url="http://www.cisecurity.org/"/>
                    <PRComp comments="This is a Cisco document. It outlines the key security elements identified for Network Security Baseline, along with implementation guidelines to assist in their design, integration, and deployment in production networks. " compCode="1022" compName="Cisco Secuirty Baseline" createdBy="root" url="http://www.cisco.com/en/US/docs/solutions/Enterpri"/>
                    <PRComp comments="This is the best practices from industry experts to help make audit recommendations in a customers environment. " compCode="1023" compName="360 GRC Best Practice" createdBy="root" url="http://www.360grc.com"/>
                    </ParentCompliance>
                    <parentriskrecommendationdetails ACTION_FLAG="RulePass" AUDIT_RESULTS="Both_pass_fail_result" CHILD_TYPE="ALL" CMD_CODE="dfg" COMMAND_REF="dfgdf" DEFINITION="dfgdf" DEVICE_RECOM_CATEGORY_CODE="IP - Addressing Services" DEVICE_RISK_CATEGORY_CODE="IP - Addressing Services" DISP_LEVEL="Parent and child result" PARENT_RULE_CODE="PR626" RATING1="3" RATING1_NAME="DISA" RATING2="3" RATING2_NAME="NSA" RATING3="3" RATING3_NAME="Cisco Secuirty Baseline" RATING4="3" RATING4_NAME="CIS" RATING5="3" RATING5_NAME="360 GRC Best Practice" RATING6="3" RATING6_NAME="INTERNAL GROUP POLICY" RATING_IMPACT="Low" RATING_PRIORITY="Low" RATING_URGENCY="Low" RECOMENDATION="dfgdf" WEB_REF="dfgdf" WEIGHTING1="10" WEIGHTING1_NAME="DISA" WEIGHTING2="10" WEIGHTING2_NAME="NSA" WEIGHTING3="10" WEIGHTING3_NAME="Cisco Secuirty Baseline" WEIGHTING4="10" WEIGHTING4_NAME="CIS" WEIGHTING5="10" WEIGHTING5_NAME="360 GRC Best Practice" WEIGHTING6="10" WEIGHTING6_NAME="INTERNAL GROUP POLICY"/>
                    </parentruledetails>
                    </Parentrule>
                    </GRC>

                    • 7. Re: How to get previous tag name from a xml in java
                      RK... Level 3

                      Hope this will help,

                       

                      NodeList children = doc.getElementsByTagName("parentruledetails").item(0).getChildNodes();
                      for (int i = 0; i < children.getLength(); i++) {
                           Node nd = children.item(i);
                           if (nd.getNodeName().equals("parentactiondetails")) {
                                Node sibling = nd.getPreviousSibling().getPreviousSibling();
                                System.out.println(sibling.getNodeName());
                           }
                      }
                      

                      • 8. Re: How to get previous tag name from a xml in java
                        sathiyabala Level 1

                        Sorry i need to get the close tag as the previous tagname like </Singleparentrule>

                         

                        oly this way of tag i need it..

                         

                        the thing wat u given is right but it isnot fetching the attribute values correctly

                         

                        so the close tag </Singleparentrule> is needed

                         

                        without that it is fetching the attribute values wrongly

                         

                        i xml i gave u before is the same xml i have

                        • 9. Re: How to get previous tag name from a xml in java
                          RK... Level 3

                          Hi,

                          I'm not clear about your requirement. Can you tell me what are the details, you would like to get from the xml?

                          The sample in my previous post returns the <SingleParentRule> node, previous sibling of <parentactiondetails>.

                          If you want to get the attribute values from <SingleParentRule> node, try getAttributes() method like,

                           

                          NodeList children = doc.getElementsByTagName("parentruledetails")
                                                   .item(0).getChildNodes();
                          for (int i = 0; i < children.getLength(); i++) {
                               Node nd = children.item(i);
                               if (nd.getNodeName().equals("parentactiondetails")) {
                                    Node sibling = nd.getPreviousSibling().getPreviousSibling();
                                          //Print previous sibling name
                                    System.out.println(sibling.getNodeName());
                          
                                          //Attributes
                                    NamedNodeMap attributes = sibling.getAttributes();
                                    for (int j = 0; j < attributes.getLength(); j++) {
                                         Node attr = attributes.item(j);
                                                  //Print attribute key and value
                                         System.out.println("\t" + attr.getNodeName() + " -- "
                                                   + attr.getNodeValue());
                                    }
                               }
                          }
                          

                          • 10. Re: How to get previous tag name from a xml in java
                            sathiyabala Level 1

                            Thank u for u r guidance...

                             

                             

                            my requirement is to import the xml into db.

                             

                            the xml which i gave u is the same thing i use

                             

                            while importing it, the enteries in the db are right till </SingleParentRule> tag ends

                             

                            after that <parentactiondetails ACTION_FLAG="RulePass" PARENT_RULE_CODE="PR626"/> this tag starts

                             

                             

                            already <parentactiondetails  ....................> tag is available inside <SignleParentRule>

                             

                            so the tag <parentactiondetails> after </SingleParentRule> also takes the same attribute value which is inside <SinglePare.......> of <parentactiondetails> so entry in db is wrong

                             

                            so i need the values correctly for <parentactiondetails ACTION_FLAG="RulePass" PARENT_RULE_CODE="PR626"/> this tag which is after

                            </SignleParentRule>

                             

                            i have in java, i have called the method for <parentactiondetails> oly after completing the <SingleParentRule> tag..

                             

                            this is my problem

                            • 11. Re: How to get previous tag name from a xml in java
                              RK... Level 3

                              This code would help you to get second <parentactiondetails>,

                               

                              // Second child (<parentactiondetails> tag). If you want to get
                              // first child (inner tag of SingleParentRule node change the item
                              // index to 0)
                              Node nd = doc.getElementsByTagName("parentactiondetails").item(1);
                              // Print node name
                              System.out.println(nd.getNodeName());
                              //Get attributes
                              NamedNodeMap attributes = nd.getAttributes();
                              for (int j = 0; j < attributes.getLength(); j++) {
                                   Node attr = attributes.item(j);
                                   //Print the attribute key and value
                                   System.out.println("\t" + attr.getNodeName() + " -- "
                                             + attr.getNodeValue());
                              }
                              
                               
                              

                              • 12. Re: How to get previous tag name from a xml in java
                                sathiyabala Level 1

                                sorry again pl

                                 

                                 

                                if it comes multiple times,

                                 

                                then how to make an increment in that item..

                                 

                                this xml is an sample thing...

                                 

                                ther may be more that 10 to 15 <SingleParentRule> tags

                                 

                                so inside each tag there will be <parentactiondetails> outside also there will <parentactiondetails>

                                 

                                 

                                now how to increment the item and get the vlues

                                • 13. Re: How to get previous tag name from a xml in java
                                  RK... Level 3

                                  The following code fetches alternate "parentactiondetails" tag,

                                   

                                  NodeList children = doc.getElementsByTagName("parentactiondetails");
                                  for (int i = 1; i < children.getLength(); i = i + 2) {
                                       // Alternate child (<parentactiondetails> tag).
                                       Node nd = children.item(i);
                                       // Print node name
                                       System.out.println(nd.getNodeName());
                                       //Get attributes
                                       NamedNodeMap attributes = nd.getAttributes();
                                       for (int j = 0; j < attributes.getLength(); j++) {
                                            Node attr = attributes.item(j);
                                            //Print the attribute key and value
                                            System.out.println("\t" + attr.getNodeName() + " -- "
                                                      + attr.getNodeValue());
                                       }
                                  }
                                  

                                  • 14. Re: How to get previous tag name from a xml in java
                                    sathiyabala Level 1

                                    Thanks For Your guidance