Jump to content
Sign in to follow this  
krishkiit

How to get xml node name dynamically in tabular format

Recommended Posts

I have many xml file for which i am creating xsl to convert it into tabular format (HTML). Problem is in xml each node is different. And also one xml is different from other. That's why i am creating one xsl file which takes the node name dynamically and convert it into tabular format. I want node name in table itself. But this should not be hard-coded. Any suggestion is welcome.Below is xml file..........

<?xml version="1.0" encoding="UTF-8"?><t_square_data_model><adapter_identifier>  <ce_adapter>   <ce_adap_vers>3.65.0</ce_adap_vers>   <ce_adap_iden></ce_adap_ident>  </ce_adapter>  <db_adapter>   <db_adap_vers></db_adap_vers>   <db_adap_ident></db_adap_ident>  </db_adapter></adapter_identifier><calling_application>  <appl_type>SAP R/3</appl_type>  <client_ident>900</client_ident></calling_application><t_square_document>  <document_line>   <cost_location></cost_location>   <net_amount>    <net_amount_doc>1.00</net_amount_doc>   </net_amount>   <cust_purchase_no></cust_purchase_no>   <doc_line_no>000001</doc_line_no>   </insurance_amount>   <taxation_line>	 <jurisdic_t_code></jurisdic_t_code>	 <jurisdic_code2></jurisdic_code2>		   <fi_book_indic>ES</fi_book_indic>						 </taxation_line>   <taxation_line_item>	 <exemption>	  <effective_date></effective_date>	 </exemption>	 <tax_zone_level>2</tax_zone_level>   <tax_registration>    <customer_reg_no></customer_reg_no>    <customer_tax_L1></customer_tax_L1>    <customer_tax_L2></customer_tax_L2>    </tax_registration>						 <customer>    <customer_type></customer_type>    <customer_tax_reg></customer_tax_reg>   </customer>   <discount_amount>   <disc_amount_loc>0.00000</disc_amount_loc>   <disc_amount_doc>0.00000</disc_amount_doc>   </discount_amount>			  </document_line></t_square_document><tax_engine_details>  <cs_patch>1.0</cs_patch>  <cs_tax_api>5.5.0</cs_tax_api>  <cs_version>5.5.0</cs_version></tax_engine_details><authentication>  <appl_id>DVL</appl_id>  <appl_pw>sapsd</appl_pw></authentication></t_square_data_model>

what sholud be the xsl to get the node name dynamically??

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...