Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8670065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:37:37+00:00 2026-06-12T18:37:37+00:00

I Have a XML document like below. i need to get record count for

  • 0

I Have a XML document like below. i need to get record count for each LOCATION_NAME and FILE_TYPE when record_type=’VALID’. LOCATION_NAME and FILY_TYPE are in Parameters. for that two parameters, i have to get the record count when the RECORD_TYPE=’VALID’.

i will be providing one LOCATION_NAME and one FILY_TYPE for each iteration (loop) and need to get count. Input parameters will be passed by external system (Tibco JDBC QUERY result in this case).

<root>
<SellOutRecord>
    <FILE_TYPE>STOSO</FILE_TYPE>
    <RECORD_TYPE>VALID</RECORD_TYPE>
    <RECORD_NO>1</RECORD_NO>
    <LOCATION_NAME>XYZ el</LOCATION_NAME>
</SellOutRecord>
<SellOutRecord>
    <FILE_TYPE>STOSO</FILE_TYPE>
    <RECORD_TYPE>ERROR</RECORD_TYPE>
    <RECORD_NO>2</RECORD_NO>
    <LOCATION_NAME>XYZ el</LOCATION_NAME>
</SellOutRecord>
<SellOutRecord>
    <FILE_TYPE>STOSO</FILE_TYPE>
    <RECORD_TYPE>VALID</RECORD_TYPE>
    <RECORD_NO>3</RECORD_NO>
    <LOCATION_NAME>XYZ el</LOCATION_NAME>
</SellOutRecord>
<SellOutRecord>
    <FILE_TYPE>STOSO</FILE_TYPE>
    <RECORD_TYPE>WARNING</RECORD_TYPE>
    <RECORD_NO>3</RECORD_NO>
    <LOCATION_NAME>XYZ el</LOCATION_NAME>
</SellOutRecord>
<SellOutRecord>
    <FILE_TYPE>STOSO</FILE_TYPE>
    <RECORD_TYPE>ERROR</RECORD_TYPE>
    <RECORD_NO>4</RECORD_NO>
    <LOCATION_NAME>XYZ el</LOCATION_NAME>
</SellOutRecord>
<SellOutRecord>
    <FILE_TYPE>STOSO</FILE_TYPE>
    <RECORD_TYPE>ERROR</RECORD_TYPE>
    <RECORD_NO>6</RECORD_NO>
    <LOCATION_NAME>XYZ XYZ</LOCATION_NAME>
</SellOutRecord>
<SellOutRecord>
    <FILE_TYPE>STOSO</FILE_TYPE>
    <RECORD_TYPE>VALID</RECORD_TYPE>
    <RECORD_NO>7</RECORD_NO>
    <LOCATION_NAME>XYZ XYZ</LOCATION_NAME>
</SellOutRecord>
<SellOutRecord>
    <FILE_TYPE>STOSO</FILE_TYPE>
    <RECORD_TYPE>VALID</RECORD_TYPE>
    <RECORD_NO>8</RECORD_NO>
    <LOCATION_NAME>XYZ XYZ</LOCATION_NAME>
</SellOutRecord>
<SellOutRecord>
    <FILE_TYPE>STOSO</FILE_TYPE>
    <RECORD_TYPE>ERROR</RECORD_TYPE>
    <RECORD_NO>9</RECORD_NO>
    <LOCATION_NAME>XYZ XYZ</LOCATION_NAME>
</SellOutRecord>
<SellOutRecord>
    <FILE_TYPE>STOSO</FILE_TYPE>
    <RECORD_TYPE>VALID</RECORD_TYPE>
    <RECORD_NO>10</RECORD_NO>
    <LOCATION_NAME>XYZ XYZ</LOCATION_NAME>
</SellOutRecord>
<InventoryRecord>
    <FILE_TYPE>STOIV</FILE_TYPE>
    <RECORD_TYPE>ERROR</RECORD_TYPE>
    <RECORD_NO>2</RECORD_NO>
    <LOCATION_NAME>XYZ el</LOCATION_NAME>
</InventoryRecord>
<InventoryRecord>
    <FILE_TYPE>STOIV</FILE_TYPE>
    <RECORD_TYPE>VALID</RECORD_TYPE>
    <RECORD_NO>4</RECORD_NO>
    <LOCATION_NAME>XYZ el</LOCATION_NAME>
</InventoryRecord>
<InventoryRecord>
    <FILE_TYPE>STOIV</FILE_TYPE>
    <RECORD_TYPE>VALID</RECORD_TYPE>
    <RECORD_NO>5</RECORD_NO>
    <LOCATION_NAME>XYZ el</LOCATION_NAME>
</InventoryRecord>
<InventoryRecord>
    <FILE_TYPE>STOIV</FILE_TYPE>
    <RECORD_TYPE>ERROR</RECORD_TYPE>
    <RECORD_NO>8</RECORD_NO>
    <LOCATION_NAME>XYZ XYZ</LOCATION_NAME>
</InventoryRecord>
<InventoryRecord>
    <FILE_TYPE>STOIV</FILE_TYPE>
    <RECORD_TYPE>ERROR</RECORD_TYPE>
    <RECORD_NO>9</RECORD_NO>
    <LOCATION_NAME>XYZ XYZ</LOCATION_NAME>
</InventoryRecord>
<InventoryRecord>
    <FILE_TYPE>STOIV</FILE_TYPE>
    <RECORD_TYPE>VALID</RECORD_TYPE>
    <RECORD_NO>11</RECORD_NO>
    <LOCATION_NAME>XYZ XYZ</LOCATION_NAME>
</InventoryRecord>
<InventoryRecord>
    <FILE_TYPE>STOIV</FILE_TYPE>
    <RECORD_TYPE>VALID</RECORD_TYPE>
    <RECORD_NO>14</RECORD_NO>
    <LOCATION_NAME>XYZ XYZ</LOCATION_NAME>
</InventoryRecord>
<SalesInRecord>
    <FILE_TYPE>STOSI</FILE_TYPE>
    <RECORD_TYPE>VALID</RECORD_TYPE>
    <RECORD_NO>1</RECORD_NO>
    <LOCATION_NAME>XYZ el</LOCATION_NAME>
</SalesInRecord>
<SalesInRecord>
    <FILE_TYPE>STOSI</FILE_TYPE>
    <RECORD_TYPE>ERROR</RECORD_TYPE>
    <RECORD_NO>2</RECORD_NO>
    <LOCATION_NAME>XYZ el</LOCATION_NAME>
</SalesInRecord>
<SalesInRecord>
    <FILE_TYPE>STOSI</FILE_TYPE>
    <RECORD_TYPE>VALID</RECORD_TYPE>
    <RECORD_NO>3</RECORD_NO>
    <LOCATION_NAME>XYZ el</LOCATION_NAME>
</SalesInRecord>
<SalesInRecord>
    <FILE_TYPE>STOSI</FILE_TYPE>
    <RECORD_TYPE>WARNING</RECORD_TYPE>
    <RECORD_NO>3</RECORD_NO>
    <LOCATION_NAME>XYZ el</LOCATION_NAME>
</SalesInRecord>
<SalesInRecord>
    <FILE_TYPE>STOSI</FILE_TYPE>
    <RECORD_TYPE>ERROR</RECORD_TYPE>
    <RECORD_NO>4</RECORD_NO>
    <LOCATION_NAME>XYZ el</LOCATION_NAME>
</SalesInRecord>
<SalesInRecord>
    <FILE_TYPE>STOSI</FILE_TYPE>
    <RECORD_TYPE>ERROR</RECORD_TYPE>
    <RECORD_NO>7</RECORD_NO>
    <LOCATION_NAME>XYZ XYZ</LOCATION_NAME>
</SalesInRecord>
<SalesInRecord>
    <FILE_TYPE>STOSI</FILE_TYPE>
    <RECORD_TYPE>VALID</RECORD_TYPE>
    <RECORD_NO>8</RECORD_NO>
    <LOCATION_NAME>XYZ XYZ</LOCATION_NAME>
</SalesInRecord>
<SalesInRecord>
    <FILE_TYPE>STOSI</FILE_TYPE>
    <RECORD_TYPE>WARNING</RECORD_TYPE>
    <RECORD_NO>8</RECORD_NO>
    <LOCATION_NAME>XYZ XYZ</LOCATION_NAME>
</SalesInRecord>
<SalesInRecord>
    <FILE_TYPE>STOSI</FILE_TYPE>
    <RECORD_TYPE>ERROR</RECORD_TYPE>
    <RECORD_NO>10</RECORD_NO>
    <LOCATION_NAME>XYZ XYZ</LOCATION_NAME>
</SalesInRecord>
</root>

for example if i provide
1. LOCATION_NAME=XYZ XYZ and FILE_TYPE=’STOSI’ then i should get valid_rec_count=1
2. LOCATION_NAME=XYZ el and FILE_TYPE=’STOIV’ then i should get valid_rec_count=2

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:37:38+00:00Added an answer on June 12, 2026 at 6:37 pm

    Use:

    count(/*/*[RECORD_TYPE='VALID']
                [FILE_TYPE = $pfileType and LOCATION_NAME = $pLocname]
         )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XML document which looks something like this: <meadinkent> <record> <comp_div>MENSWEAR</comp_div> <sty_ret_type>ACCESSORIES</sty_ret_type>
I have a XML document like shown below: <root> <level1> <level2> <level3> ..... </level3>
I have an xml document like the below one that I am trying to
I have xml document like below, <chapter xmlns:xi=http://www.w3.org/2001/XInclude xml:id=chapter1> <title>First chapter</title> <section xml:id=section1> <imageobject>
I have an xml document that looks something like below (resources.xml), with a corresponding
I have a xml document like this : <Node1 attrib1=abc> <node1_1> <node1_1_1 attrib2 =
Hi I have an xml document like this <root> <cert id=1> </cert> <cert id=2>
I have an xml document that looks like this. <foo> <bar type=artist/> Bob Marley
I have an XML document which contains nodes like following:- <a class=custom>test</a> <a class=xyz></a>
I have an XML document that matches our site navigation something like this: <page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.