{"id":9879,"date":"2021-12-03T09:10:26","date_gmt":"2021-12-03T09:10:26","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=9879"},"modified":"2021-12-03T09:10:50","modified_gmt":"2021-12-03T09:10:50","slug":"count-the-no-of-records-in-a-xml-file-unix","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/unix\/count-the-noof-records-in-a-xml-file-unix\/8801.html","title":{"rendered":"Count The No. Of Records In a Xml File + Unix"},"content":{"rendered":"<p>Hi Gurus,<\/p>\n<p>I have a XML file in unix which contains some 1392 records when I do a wc-l command on the filename,<\/p>\n<p>Say example,<\/p>\n<p>wc -l filename.xml<\/p>\n<p>I would like to know how to do a count of records as xml file and normal file is not same as XML contains the open parent tag and the corresponding closing tag.<\/p>\n<p>So for an effective way of counting the total no. of records of a XML file in unix, what should be done?<\/p>\n<p>I am just learning Unix and would like to have a thought on this..<\/p>\n<p>Thanks,<br \/>\nBharathih<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":17},"question-category":[64],"question_tags":[],"class_list":["post-9879","question","type-question","status-publish","hentry","question-category-unix"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/9879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=9879"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=9879"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=9879"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=9879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}